-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Librador logger configurable (#210)
* Refactor librador logging * Make librador logger configurable
- Loading branch information
Showing
6 changed files
with
107 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Librador_API/___librador/librador_shared_library/logging.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef LOGGING_H | ||
#define LOGGING_H | ||
|
||
enum { | ||
LOG_NONE = 0, | ||
LOG_ERROR, | ||
LOG_WARNING, | ||
LOG_DEBUG, | ||
}; | ||
|
||
#endif // LOGGING_H |
13 changes: 13 additions & 0 deletions
13
Librador_API/___librador/librador_shared_library/logging_internal.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef LOGGING_INTERNAL_H | ||
#define LOGGING_INTERNAL_H | ||
|
||
#include "logging.h" | ||
|
||
#define LIBRADOR_LOG(level, ...) \ | ||
do { \ | ||
librador_global_logger(level, __VA_ARGS__); \ | ||
} while (0) | ||
|
||
void librador_global_logger(const int level, const char * format, ...); | ||
|
||
#endif // LOGGING_INTERNAL_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters