AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
GUILogBridge.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_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_GUILOGBRIDGE_H_
17 #define ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_GUILOGBRIDGE_H_
18 
19 #include <string>
20 
22 
23 namespace alexaClientSDK {
24 namespace sampleApplications {
25 namespace ipcServerSampleApp {
26 
30 enum class IPCLogLevel {
32  DEBUG5,
34  INFO,
36  WARN,
38  ERROR,
40  UNKNOWN
41 };
42 
50  if ("DEBUG" == logLevel) {
51  return IPCLogLevel::DEBUG5;
52  } else if ("INFO" == logLevel) {
53  return IPCLogLevel::INFO;
54  } else if ("WARN" == logLevel) {
55  return IPCLogLevel::WARN;
56  } else if ("ERROR" == logLevel) {
57  return IPCLogLevel::ERROR;
58  } else {
59  return IPCLogLevel::UNKNOWN;
60  }
61 }
62 
66 class GUILogBridge {
67 public:
74  void log(IPCLogLevel logLevel, const std::string& message);
75 
76 private:
80  static void executeLog(IPCLogLevel logLevel, const std::string& message);
81 
84 };
85 } // namespace ipcServerSampleApp
86 } // namespace sampleApplications
87 } // namespace alexaClientSDK
88 
89 #endif // ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_GUILOGBRIDGE_H_
Logs of normal operations, to be used in release builds.
::std::string string
Definition: gtest-port.h:1097
Log of an event that indicates an error.
Single-thread executor implementation.
Definition: Executor.h:45
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
tuple message
Definition: gtest_output_test.py:331
IPCLogLevel ipcLogLevelFromString(const std::string &logLevel)
Definition: GUILogBridge.h:49

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