Changeset f92b315 in mainline
- Timestamp:
- 2019-08-17T13:58:13Z (5 years ago)
- Children:
- 241f1985
- Parents:
- 8d74fdd
- git-author:
- Michal Koutny <xm.koutny+hos@…> (2016-02-07 22:30:40)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-17 13:58:13)
- Location:
- uspace/srv/sysman
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/log.c
r8d74fdd rf92b315 37 37 38 38 static FILE *log_file = NULL; 39 static log_level_t max_level = LVL_NOTE; 40 41 extern void sysman_log_init(log_level_t level) 42 { 43 max_level = level; 44 } 39 45 40 46 void sysman_log(log_level_t level, const char *fmt, ...) 41 47 { 48 if (level > max_level) { 49 return; 50 } 42 51 va_list args; 43 52 va_start(args, fmt); -
uspace/srv/sysman/log.h
r8d74fdd rf92b315 33 33 #include <stdio.h> 34 34 35 extern void sysman_log_init(log_level_t); 36 35 37 /* 36 38 * Temporarily use only simple printfs, later add some smart logging, -
uspace/srv/sysman/unit.c
r8d74fdd rf92b315 137 137 int unit_start(unit_t *unit) 138 138 { 139 sysman_log(LVL_ DEBUG, "%s('%s')", __func__, unit_name(unit));139 sysman_log(LVL_NOTE, "%s('%s')", __func__, unit_name(unit)); 140 140 return UNIT_VMT(unit)->start(unit); 141 141 } … … 147 147 int unit_stop(unit_t *unit) 148 148 { 149 sysman_log(LVL_ DEBUG, "%s('%s')", __func__, unit_name(unit));149 sysman_log(LVL_NOTE, "%s('%s')", __func__, unit_name(unit)); 150 150 return UNIT_VMT(unit)->stop(unit); 151 151 } … … 153 153 void unit_exposee_created(unit_t *unit) 154 154 { 155 sysman_log(LVL_DEBUG , "%s('%s')", __func__, unit_name(unit));155 sysman_log(LVL_DEBUG2, "%s('%s')", __func__, unit_name(unit)); 156 156 return UNIT_VMT(unit)->exposee_created(unit); 157 157 } … … 159 159 void unit_fail(unit_t *unit) 160 160 { 161 sysman_log(LVL_ DEBUG, "%s('%s')", __func__, unit_name(unit));161 sysman_log(LVL_WARN, "%s('%s')", __func__, unit_name(unit)); 162 162 return UNIT_VMT(unit)->fail(unit); 163 163 }
Note:
See TracChangeset
for help on using the changeset viewer.