Alexa Auto SDK  2.0.0
LoggerEngineInterfaces.h
1 /*
2  * Copyright 2017-2019 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:
32 
36  enum class Level {
37 
41  VERBOSE,
42 
46  INFO,
47 
51  METRIC,
52 
56  WARN,
57 
61  ERROR,
62 
66  CRITICAL
67  };
68 
69  virtual void log( Level level, const std::string& tag, const std::string& message ) = 0;
70 };
71 
72 inline std::ostream& operator<<(std::ostream& stream, const LoggerEngineInterface::Level& level) {
73  switch (level) {
75  stream << "VERBOSE";
76  break;
78  stream << "INFO";
79  break;
81  stream << "METRIC";
82  break;
84  stream << "WARN";
85  break;
87  stream << "ERROR";
88  break;
90  stream << "CRITICAL";
91  break;
92  }
93  return stream;
94 }
95 
96 } // aace::logger
97 } // aace
98 
99 #endif // AACE_LOGGER_LOGGER_ENGINE_INTERFACES_H
Level
Definition: LoggerEngineInterfaces.h:36
Definition: AddressBook.h:26
Definition: LoggerEngineInterfaces.h:30

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