Commit bbf4463fdaece258637204cf47597374c253f3ef
1 parent
2534fb9e
create a static global logger as a default logger. For now this logs everything on stderr.
Showing
2 changed files
with
5 additions
and
0 deletions
@@ -54,6 +54,8 @@ TR_CLASS(TR_LoggerSyslog) { | @@ -54,6 +54,8 @@ TR_CLASS(TR_LoggerSyslog) { | ||
54 | TR_EXTENDS(TR_Logger); | 54 | TR_EXTENDS(TR_Logger); |
55 | }; | 55 | }; |
56 | 56 | ||
57 | +extern TR_Logger TR_logger; | ||
58 | + | ||
57 | #endif // __TR_LOGGER_H__ | 59 | #endif // __TR_LOGGER_H__ |
58 | 60 | ||
59 | // vim: set ts=4 sw=4: | 61 | // vim: set ts=4 sw=4: |
@@ -36,4 +36,7 @@ logStderr(void * this, TR_logger_level level, const char * const msg) | @@ -36,4 +36,7 @@ logStderr(void * this, TR_logger_level level, const char * const msg) | ||
36 | TR_INIT_IFACE(TR_Logger, logStderr); | 36 | TR_INIT_IFACE(TR_Logger, logStderr); |
37 | TR_CREATE_CLASS(TR_LoggerStderr, TR_Logger, TR_IF(TR_Logger)); | 37 | TR_CREATE_CLASS(TR_LoggerStderr, TR_Logger, TR_IF(TR_Logger)); |
38 | 38 | ||
39 | +TR_INSTANCE(TR_LoggerStderr, TR_debugConlogger, {TR_LOGGER_DEBUG}); | ||
40 | +TR_Logger TR_logger = TR_INSTANCE_CAST(TR_Logger, TR_debugConlogger); | ||
41 | + | ||
39 | // vim: set ts=4 sw=4: | 42 | // vim: set ts=4 sw=4: |
Please
register
or
login
to post a comment