Changeset cba45af in mainline for uspace/srv/logger/logger.h
- Timestamp:
- 2012-08-16T21:01:55Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2bf781a
- Parents:
- e005f92
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/logger/logger.h
re005f92 rcba45af 42 42 #include <bool.h> 43 43 #include <fibril_synch.h> 44 #include <stdio.h> 44 45 45 46 #define NAME "logger" 46 #define MAX_ NAMESPACE_LENGTH 25647 #define MAX_SUBLOGS 64 47 48 #define LOG_LEVEL_USE_DEFAULT (LVL_LIMIT + 1) 48 49 49 typedef struct logging_namespace logging_namespace_t; 50 typedef struct { 51 const char *name; 52 log_level_t logged_level; 53 } logger_sublog_t; 50 54 51 logging_namespace_t *namespace_create(const char *); 52 const char *namespace_get_name(logging_namespace_t *); 53 void namespace_destroy(logging_namespace_t *); 54 logging_namespace_t *namespace_writer_attach(const char *); 55 void namespace_writer_detach(logging_namespace_t *); 55 typedef struct { 56 const char *name; 57 FILE *logfile; 58 log_level_t logged_level; 59 size_t sublog_count; 60 logger_sublog_t sublogs[MAX_SUBLOGS]; 56 61 57 int namespace_change_level(logging_namespace_t *, log_level_t); 62 link_t link; 63 } logger_toplevel_log_t; 58 64 59 bool namespace_has_reader(logging_namespace_t *, sysarg_t, log_level_t);60 void namespace_add_message(logging_namespace_t *, const char *, sysarg_t, log_level_t);61 65 62 int namespace_create_context(logging_namespace_t *, const char *); 63 int namespace_change_context_level(logging_namespace_t *, const char *, log_level_t); 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 *); 64 70 65 71 log_level_t get_default_logging_level(void);
Note:
See TracChangeset
for help on using the changeset viewer.