Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MOJO_PUBLIC_C_ENVIRONMENT_LOGGER_H_ | |
| 6 #define MOJO_PUBLIC_C_ENVIRONMENT_LOGGER_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 // |MojoLogLevel|: Used to specify the type of log message. Values are ordered | |
| 11 // by severity (i.e., higher numerical values are more severe). | |
| 12 | |
| 13 typedef int32_t MojoLogLevel; | |
| 14 | |
| 15 #ifdef __cplusplus | |
| 16 const MojoLogLevel MOJO_LOG_LEVEL_VERBOSE = -1; | |
| 17 const MojoLogLevel MOJO_LOG_LEVEL_INFO = 0; | |
| 18 const MojoLogLevel MOJO_LOG_LEVEL_WARNING = 1; | |
| 19 const MojoLogLevel MOJO_LOG_LEVEL_ERROR = 2; | |
| 20 const MojoLogLevel MOJO_LOG_LEVEL_FATAL = 3; | |
| 21 #else | |
| 22 #define MOJO_LOG_LEVEL_INFO ((MojoLogLevel) 0) | |
|
darin (slow to review)
2014/06/14 06:08:23
MOJO_LOG_LEVEL_VERBOSE needed for the C case too?
| |
| 23 #define MOJO_LOG_LEVEL_WARNING ((MojoLogLevel) 1) | |
| 24 #define MOJO_LOG_LEVEL_ERROR ((MojoLogLevel) 2) | |
| 25 #define MOJO_LOG_LEVEL_FATAL ((MojoLogLevel) 3) | |
| 26 #endif | |
| 27 | |
| 28 struct MojoLogger { | |
| 29 void (*LogMessage)(MojoLogLevel log_level, const char* message); | |
| 30 }; | |
| 31 | |
| 32 #endif // MOJO_PUBLIC_C_ENVIRONMENT_LOGGER_H_ | |
| OLD | NEW |