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

Changeset 9ba10f0 in mainline


Ignore:
Timestamp:
2012-08-16T22:43:22Z (9 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
330a59f
Parents:
f50a756
Message:

More precise boot options for logger

It is possible to specify the (global) default level by
simply specifying its name or provide LOG=LEVEL pairs for
individual services.

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

Legend:

Unmodified
Added
Removed
  • uspace/srv/logger/Makefile

    rf50a756 r9ba10f0  
    3333SOURCES = \
    3434        ctl.c \
     35        initlvl.c \
    3536        level.c \
    3637        logs.c \
  • uspace/srv/logger/logger.h

    rf50a756 r9ba10f0  
    7676void logger_connection_handler_writer(ipc_callid_t);
    7777
     78void parse_initial_settings(void);
     79void parse_level_settings(char *);
     80
    7881#endif
    7982
  • uspace/srv/logger/main.c

    rf50a756 r9ba10f0  
    6969        printf(NAME ": HelenOS Logging Service\n");
    7070       
    71         /* Get default logging level from sysinfo (if available). */
    72         log_level_t boot_logging_level = LVL_NOTE;
    73         int rc = logctl_get_boot_level(&boot_logging_level);
    74         if (rc == EOK)
    75                 set_default_logging_level(boot_logging_level);
    76         else
    77                 printf(NAME ": Warn: failed to get logging level from sysinfo: %s.\n",
    78                     str_error(rc));
     71        parse_initial_settings();
     72        for (int i = 1; i < argc; i++) {
     73                parse_level_settings(argv[i]);
     74        }
    7975
    8076        async_set_client_connection(connection_handler);
    8177       
    82         rc = service_register(SERVICE_LOGGER);
     78        int rc = service_register(SERVICE_LOGGER);
    8379        if (rc != EOK) {
    8480                printf(NAME ": failed to register: %s.\n", str_error(rc));
Note: See TracChangeset for help on using the changeset viewer.