AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Level.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_LOGGER_LEVEL_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_LOGGER_LEVEL_H_
18 
19 #include <iostream>
20 #include <string>
21 
22 namespace alexaClientSDK {
23 namespace avsCommon {
24 namespace utils {
25 namespace logger {
26 
30 enum class Level {
32  DEBUG9,
33 
35  DEBUG8,
36 
38  DEBUG7,
39 
41  DEBUG6,
42 
44  DEBUG5,
45 
47  DEBUG4,
48 
50  DEBUG3,
51 
53  DEBUG2,
54 
56  DEBUG1,
57 
59  DEBUG0,
60 
62  INFO,
63 
65  WARN,
66 
68  ERROR,
69 
71  CRITICAL,
72 
74  NONE,
75 
77  UNKNOWN
78 };
79 
85 std::string convertLevelToName(Level level);
86 
93 char convertLevelToChar(Level level);
94 
101 Level convertNameToLevel(const std::string& name);
102 
110 inline std::ostream& operator<<(std::ostream& stream, Level level) {
111  stream << convertLevelToName(level);
112  return stream;
113 }
114 
115 } // namespace logger
116 } // namespace utils
117 } // namespace avsCommon
118 } // namespace alexaClientSDK
119 
120 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_LOGGER_LEVEL_H_
Most verbose debug log level. Compiled out when ACSDK_DEBUG_LOG_ENABLED is not defined.
Log of a event that indicates an unrecoverable error.
Level convertNameToLevel(const std::string &name)
Definition: Level.cpp:80
Logs of normal operations, to be used in release builds.
Log of an event that indicates an error.
Intermediate debug log level. Compiled out when ACSDK_DEBUG_LOG_ENABLED is not defined.
Intermediate debug log level. Compiled out when ACSDK_DEBUG_LOG_ENABLED is not defined.
Least verbose debug log level. Compiled out when ACSDK_DEBUG_LOG_ENABLED is not defined.
Intermediate debug log level. Compiled out when ACSDK_DEBUG_LOG_ENABLED is not defined.
std::ostream & operator<<(std::ostream &stream, Level level)
Definition: Level.h:110
Intermediate debug log level. Compiled out when ACSDK_DEBUG_LOG_ENABLED is not defined.
Intermediate debug log level. Compiled out when ACSDK_DEBUG_LOG_ENABLED is not defined.
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Log of an event that may indicate a problem.
Intermediate debug log level. Compiled out when ACSDK_DEBUG_LOG_ENABLED is not defined.
Intermediate debug log level. Compiled out when ACSDK_DEBUG_LOG_ENABLED is not defined.
std::string convertLevelToName(Level level)
Definition: Level.cpp:29
Intermediate debug log level. Compiled out when ACSDK_DEBUG_LOG_ENABLED is not defined.
char convertLevelToChar(Level level)
Definition: Level.cpp:55

AlexaClientSDK 1.26.0 - Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0