Changeset 3f05ef7 in mainline


Ignore:
Timestamp:
2019-08-06T19:23:02Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
dba056b
Parents:
63a3276
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-06-20 00:57:34)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-06 19:23:02)
Message:

sysman: Catch debug log output to file (temporary version)

Location:
uspace/srv/sysman
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/sysman/Makefile

    r63a3276 r3f05ef7  
    4343        dep.c \
    4444        job.c \
     45        log.c \
    4546        sysman.c \
    4647        unit.c \
  • uspace/srv/sysman/log.h

    r63a3276 r3f05ef7  
    3737 * that would use logger as soon as it's ready.
    3838 */
    39 #define sysman_log(level, fmt, ...) printf("sysman: " fmt "\n", ##__VA_ARGS__)
     39//#define sysman_log(level, fmt, ...) if(level > LVL_DEBUG2) printf("sysman: " fmt "\n", ##__VA_ARGS__)
    4040
     41extern void sysman_log(log_level_t, const char *, ...) PRINTF_ATTRIBUTE(2, 3);
     42
     43extern void sysman_log_tofile(void);
    4144#endif
  • uspace/srv/sysman/units/unit_mnt.c

    r63a3276 r3f05ef7  
    234234        assert(unit->state == STATE_STOPPED || unit->state == STATE_STARTING);
    235235
     236        if (str_cmp(unit_name(unit), "rootfs.mnt") == 0) {
     237                sysman_log_tofile();
     238        }
    236239        unit->state = STATE_STARTED;
    237240        unit_notify_state(unit);
Note: See TracChangeset for help on using the changeset viewer.