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

Changeset 80d8885 in mainline for uspace/app/logset/main.c


Ignore:
Timestamp:
2012-08-16T15:08:19Z (9 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
dc5aa568
Parents:
32b26cf7
Message:

Set levels for individual contexts

File:
1 edited

Legend:

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

    r32b26cf7 r80d8885  
    5555        fprintf(stderr, "  %s <default-logging-level>\n", progname);
    5656        fprintf(stderr, "  %s <namespace> <logging-level>\n", progname);
     57        fprintf(stderr, "  %s <namespace> <context> <logging-level>\n", progname);
    5758}
    5859
     
    7879                        return 2;
    7980                }
     81        } else if (argc == 4) {
     82                log_level_t new_level = parse_log_level_or_die(argv[3]);
     83                const char *namespace = argv[1];
     84                const char *context = argv[2];
     85                int rc = logctl_set_context_level(namespace, context, new_level);
     86                if (rc != EOK) {
     87                        fprintf(stderr, "Failed to change logging level: %s.\n",
     88                            str_error(rc));
     89                        return 2;
     90                }
    8091        } else {
    8192                usage(argv[0]);
Note: See TracChangeset for help on using the changeset viewer.