Changeset 717a0aa in mainline
- Timestamp:
- 2012-08-16T12:09:09Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9a53e00
- Parents:
- 7034b443
- Location:
- uspace/lib/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/log.c
r7034b443 r717a0aa 241 241 } 242 242 243 bool _ _log_shall_record(log_level_t level)243 bool _log_shall_record(log_level_t level) 244 244 { 245 245 return get_current_observed_level() >= level; … … 253 253 * @param fmt Format string (no traling newline). 254 254 */ 255 void _ _log_msg(log_level_t level, const char *fmt, ...)255 void _log_msg(log_level_t level, const char *fmt, ...) 256 256 { 257 257 va_list args; 258 258 259 259 va_start(args, fmt); 260 _ _log_msgv(level, fmt, args);260 _log_msgv(level, fmt, args); 261 261 va_end(args); 262 262 } … … 269 269 * @param fmt Format string (no trailing newline) 270 270 */ 271 void _ _log_msgv(log_level_t level, const char *fmt, va_list args)271 void _log_msgv(log_level_t level, const char *fmt, va_list args) 272 272 { 273 273 assert(level < LVL_LIMIT); -
uspace/lib/c/include/io/log.h
r7034b443 r717a0aa 53 53 extern int log_level_from_str(const char *, log_level_t *); 54 54 55 extern bool _ _log_shall_record(log_level_t);55 extern bool _log_shall_record(log_level_t); 56 56 extern int log_init(const char *, log_level_t); 57 57 58 58 #define log_msg(level, format, ...) \ 59 59 do { \ 60 if (_ _log_shall_record((level))) { \61 _ _log_msg(level, format, ##__VA_ARGS__); \60 if (_log_shall_record((level))) { \ 61 _log_msg(level, format, ##__VA_ARGS__); \ 62 62 } \ 63 63 } while (false) … … 65 65 #define log_msgv(level, format, args) \ 66 66 do { \ 67 if (_ _log_shall_record((level))) { \68 _ _log_msgv(level, format, args); \67 if (_log_shall_record((level))) { \ 68 _log_msgv(level, format, args); \ 69 69 } \ 70 70 } while (false) 71 71 72 extern void _ _log_msg(log_level_t, const char *, ...);73 extern void _ _log_msgv(log_level_t, const char *, va_list);72 extern void _log_msg(log_level_t, const char *, ...); 73 extern void _log_msgv(log_level_t, const char *, va_list); 74 74 75 75 #endif
Note:
See TracChangeset
for help on using the changeset viewer.