Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset f039dba in mainline for uspace/srv/logger/logger.h


Ignore:
Timestamp:
2012-08-17T09:57:27Z (9 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
b1912b0c
Parents:
f72ae3b
Message:

Logger also works with hierarchy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/logger/logger.h

    rf72ae3b rf039dba  
    4848#define LOG_LEVEL_USE_DEFAULT (LVL_LIMIT + 1)
    4949
    50 typedef struct {
    51         const char *name;
    52         log_level_t logged_level;
    53 } logger_sublog_t;
     50typedef struct logger_log logger_log_t;
    5451
    5552typedef struct {
    56         const char *name;
    5753        FILE *logfile;
     54} logger_dest_t;
     55
     56struct logger_log {
     57        link_t link;
     58
     59        char *name;
     60        char *full_name;
     61        logger_log_t *parent;
    5862        log_level_t logged_level;
    59         size_t sublog_count;
    60         logger_sublog_t sublogs[MAX_SUBLOGS];
     63        logger_dest_t *dest;
     64};
    6165
    62         link_t link;
    63 } logger_toplevel_log_t;
    64 
    65 
    66 logger_toplevel_log_t *find_or_create_toplevel_log(const char *);
    67 logger_toplevel_log_t *find_toplevel_log(sysarg_t);
    68 bool shall_log_message(logger_toplevel_log_t *, sysarg_t, log_level_t);
    69 int add_sub_log(logger_toplevel_log_t *, const char *, sysarg_t *);
     66logger_log_t *find_log_by_name(const char *name);
     67logger_log_t *find_or_create_log(const char *name, sysarg_t parent);
     68logger_log_t *find_log_by_id(sysarg_t);
     69bool shall_log_message(logger_log_t *, log_level_t);
    7070
    7171log_level_t get_default_logging_level(void);
Note: See TracChangeset for help on using the changeset viewer.