Changeset 1c67b41 in mainline for uspace/lib/c/generic/io/log.c


Ignore:
Timestamp:
2012-08-16T11:20:24Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
eab3d04
Parents:
04da852
Message:

Use log level names when printing instead of numbers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/log.c

    r04da852 r1c67b41  
    4646static const char *log_prog_name;
    4747
     48static const char *log_level_names[] = {
     49        "fatal",
     50        "error",
     51        "warn",
     52        "note",
     53        "debug",
     54        "debug2"
     55};
     56
    4857/** IPC session with the logger service. */
    4958static async_sess_t *logger_session;
     
    162171}
    163172
     173const char *log_level_str(log_level_t level)
     174{
     175        if (level >= LVL_LIMIT)
     176                return "unknown";
     177        else
     178                return log_level_names[level];
     179}
     180
    164181/** Initialize the logging system.
    165182 *
Note: See TracChangeset for help on using the changeset viewer.