AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
ConsolePrinter.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_SAMPLEAPP_INCLUDE_SAMPLEAPP_CONSOLEPRINTER_H_
17 #define ALEXA_CLIENT_SDK_SAMPLEAPP_INCLUDE_SAMPLEAPP_CONSOLEPRINTER_H_
18 
19 #include <mutex>
20 #include <string>
21 
24 
25 namespace alexaClientSDK {
26 namespace sampleApp {
27 
32 public:
39 
45  static void simplePrint(const std::string& stringToPrint);
46 
52  static void prettyPrint(const std::string& stringToPrint);
53 
59  static void prettyPrint(std::initializer_list<std::string> lines);
60 
67  static void captionsPrint(const std::vector<std::string>& lines);
68 
71  void emit(
73  std::chrono::system_clock::time_point time,
74  const char* threadMoniker,
75  const char* text) override;
77 
78 private:
84  std::shared_ptr<std::mutex> m_mutex;
85 
90 };
91 
92 } // namespace sampleApp
93 } // namespace alexaClientSDK
94 
95 #endif // ALEXA_CLIENT_SDK_SAMPLEAPP_INCLUDE_SAMPLEAPP_CONSOLEPRINTER_H_
LogStringFormatter.h
alexaClientSDK::avsCommon::utils::logger::Level
Level
Definition: Level.h:30
Logger.h
alexaClientSDK::avsCommon::utils::logger::Logger
Definition: Logger.h:150
alexaClientSDK
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
alexaClientSDK::sampleApp::ConsolePrinter
Definition: ConsolePrinter.h:31
alexaClientSDK::avsCommon::utils::logger::LogStringFormatter
Definition: LogStringFormatter.h:32
alexaClientSDK::sampleApp::ConsolePrinter::prettyPrint
static void prettyPrint(const std::string &stringToPrint)
Definition: ConsolePrinter.cpp:109
alexaClientSDK::sampleApp::ConsolePrinter::emit
void emit(avsCommon::utils::logger::Level level, std::chrono::system_clock::time_point time, const char *threadMoniker, const char *text) override
Definition: ConsolePrinter.cpp:113
alexaClientSDK::sampleApp::ConsolePrinter::captionsPrint
static void captionsPrint(const std::vector< std::string > &lines)
Definition: ConsolePrinter.cpp:76
alexaClientSDK::sampleApp::ConsolePrinter::simplePrint
static void simplePrint(const std::string &stringToPrint)
Definition: ConsolePrinter.cpp:43
alexaClientSDK::sampleApp::ConsolePrinter::ConsolePrinter
ConsolePrinter()
Definition: ConsolePrinter.cpp:38

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