Alexa Auto SDK  2.3.0
LoggerEngineInterfaces.h
1 /*
2  * Copyright 2017-2020 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 AACE_LOGGER_LOGGER_ENGINE_INTERFACES_H
17 #define AACE_LOGGER_LOGGER_ENGINE_INTERFACES_H
18 
19 #include <string>
20 #include <iostream>
21 
24 namespace aace {
25 namespace logger {
26 
31 public:
35  enum class Level {
36 
40  VERBOSE,
41 
45  INFO,
46 
50  METRIC,
51 
55  WARN,
56 
60  ERROR,
61 
65  CRITICAL
66  };
67 
68  virtual void log(Level level, const std::string& tag, const std::string& message) = 0;
69 };
70 
71 inline std::ostream& operator<<(std::ostream& stream, const LoggerEngineInterface::Level& level) {
72  switch (level) {
74  stream << "VERBOSE";
75  break;
77  stream << "INFO";
78  break;
80  stream << "METRIC";
81  break;
83  stream << "WARN";
84  break;
86  stream << "ERROR";
87  break;
89  stream << "CRITICAL";
90  break;
91  }
92  return stream;
93 }
94 
95 } // namespace logger
96 } // namespace aace
97 
98 #endif // AACE_LOGGER_LOGGER_ENGINE_INTERFACES_H
Level
Definition: LoggerEngineInterfaces.h:35
Definition: AddressBook.h:26
Definition: LoggerEngineInterfaces.h:30

Alexa Auto SDK 2.3.0 - Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0