Changeset 03362fbd in mainline for uspace/lib/c/include/io/log.h


Ignore:
Timestamp:
2013-02-09T23:14:45Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
22dfd38
Parents:
b5d2e57 (diff), 005b765 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

Conflict resulting from bool.h → stdbool.h move and ddf structs turning opaque.
Fails to boot to shell console.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/io/log.h

    rb5d2e57 r03362fbd  
    3636
    3737#include <stdarg.h>
     38#include <inttypes.h>
     39#include <io/verify.h>
    3840
     41/** Log message level. */
    3942typedef enum {
     43        /** Fatal error, program is not able to recover at all. */
    4044        LVL_FATAL,
     45        /** Serious error but the program can recover from it. */
    4146        LVL_ERROR,
     47        /** Easily recoverable problem. */
    4248        LVL_WARN,
     49        /** Information message that ought to be printed by default. */
    4350        LVL_NOTE,
     51        /** Debugging purpose message. */
    4452        LVL_DEBUG,
     53        /** More detailed debugging message. */
    4554        LVL_DEBUG2,
    46 
     55       
    4756        /** For checking range of values */
    4857        LVL_LIMIT
    4958} log_level_t;
    5059
    51 extern int log_init(const char *, log_level_t);
    52 extern void log_msg(log_level_t, const char *, ...);
    53 extern void log_msgv(log_level_t, const char *, va_list);
     60/** Log itself (logging target). */
     61typedef sysarg_t log_t;
     62/** Formatting directive for printing log_t. */
     63#define PRIlogctx PRIxn
     64
     65/** Default log (target). */
     66#define LOG_DEFAULT ((log_t) -1)
     67
     68/** Use when creating new top-level log. */
     69#define LOG_NO_PARENT ((log_t) 0)
     70
     71extern const char *log_level_str(log_level_t);
     72extern int log_level_from_str(const char *, log_level_t *);
     73
     74extern int log_init(const char *);
     75extern log_t log_create(const char *, log_t);
     76
     77extern void log_msg(log_t, log_level_t, const char *, ...)
     78    PRINTF_ATTRIBUTE(3, 4);
     79extern void log_msgv(log_t, log_level_t, const char *, va_list);
    5480
    5581#endif
Note: See TracChangeset for help on using the changeset viewer.