All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arm.mbed.cloud.sdk.common.CallLogLevel Maven / Gradle / Ivy

Go to download

The Pelion Cloud SDK (formerly known as Mbed Cloud SDK) provides a simplified interface to the Pelion Cloud APIs by exposing functionality using conventions and paradigms familiar to Java developers.

There is a newer version: 2.5.0
Show newest version
package com.arm.mbed.cloud.sdk.common;

import com.arm.mbed.cloud.sdk.annotations.Preamble;

@Preamble(description = "Log level of the http communications between client and Arm Mbed Cloud")
public enum CallLogLevel {
    /**
     * No HTTP logs are logged.
     */
    NONE,
    /**
     * Logs request and response lines.
     * 

* See HttpLoggingInterceptor (https://github.com/square/okhttp/tree/master/okhttp-logging-interceptor) for more * information */ BASIC, /** * Logs request and response lines and their respective headers. *

* See HttpLoggingInterceptor (https://github.com/square/okhttp/tree/master/okhttp-logging-interceptor) for more * information */ HEADERS, /** * Logs request and response lines and their respective headers and bodies (if present). *

* See HttpLoggingInterceptor (https://github.com/square/okhttp/tree/master/okhttp-logging-interceptor) for more * information */ BODY; /** * Gets the log level from a string. * * @param level * string * @return corresponding log level. If not found, no logging will be performed. */ public static CallLogLevel getLevel(String level) { if (level == null || level.isEmpty()) { return NONE; } final String trimmedLevel = level.trim(); for (final CallLogLevel logLevel : values()) { if (logLevel.toString().equalsIgnoreCase(trimmedLevel)) { return logLevel; } } return NONE; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy