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

Changeset eab3d04 in mainline for uspace/app/logset/main.c


Ignore:
Timestamp:
2012-08-16T11:36:54Z (9 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
494f417
Parents:
1c67b41
Message:

Allow specifying of log level as a name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/logset/main.c

    r1c67b41 reab3d04  
    4747        }
    4848
    49         log_level_t new_default_level = (log_level_t) strtol(argv[1], NULL, 0);
     49        log_level_t new_default_level;
     50        int rc = log_level_from_str(argv[1], &new_default_level);
     51        if (rc != EOK) {
     52                fprintf(stderr, "Unrecognised log level '%s': %s.\n",
     53                    argv[1], str_error(rc));
     54        }
    5055
    51         int rc = logctl_set_default_level(new_default_level);
     56        rc = logctl_set_default_level(new_default_level);
    5257
    5358        if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.