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

Changeset 2bf781a in mainline for uspace/app/tester/stdio/logger2.c


Ignore:
Timestamp:
2012-08-16T21:50:52Z (9 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
f50a756
Parents:
cba45af
Message:

Pretend logs form a tree hierarchy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/stdio/logger2.c

    rcba45af r2bf781a  
    3636const char *test_logger2(void)
    3737{
    38         log_t log_alpha = log_create("alpha");
    39         log_t log_bravo = log_create("bravo");
     38        log_t log_alpha = log_create("alpha", LOG_DEFAULT);
     39        log_t log_bravo = log_create("bravo", log_alpha);
    4040
    41         TPRINTF("Alpha context is %" PRIlogctx ".\n", log_alpha);
    42         TPRINTF("Bravo context is %" PRIlogctx ".\n", log_bravo);
     41        TPRINTF("Alpha is %" PRIlogctx ".\n", log_alpha);
     42        TPRINTF("Bravo is %" PRIlogctx ".\n", log_bravo);
    4343
    4444        while (true) {
     
    5454                            (int) level, log_level_str(level));
    5555                        log_log_msg(log_bravo, level,
    56                             "Printing level %d (%s) into bravo log.",
     56                            "Printing level %d (%s) into bravo sub-log.",
    5757                            (int) level, log_level_str(level));
    5858                        async_usleep(1000 * 100);
Note: See TracChangeset for help on using the changeset viewer.