1 #include <ccan/log/log.h>
4 * log - pretty-print logging information
6 * log is a set of functions and helper macros intended to make it easy to
7 * pretty-print log entries.
10 * #include <ccan/log/log.h>
12 * int main(int argc, char *argv[])
14 * print_log(LOG_INFO, "This is an info message.\n");
15 * print_log(LOG_WARNING, "This is a warning message. It indicates that"
16 * " an operation encountered minor issues\n");
17 * print_log(LOG_ERROR, "This is an error message. It indicates that the\n"
18 * "program could not complete an operation, but\n"
19 * "that the error was not fatal. It might have\n"
20 * "an error code, like so: %x\n", 0xDEADBEEF);
21 * print_log(LOG_CRITICAL, "This is a critical message. It indicates\n"
22 * "that the program had an unrecoverable error.\n");
23 * set_log_mode(LOG_CONCISE);
24 * print_log(LOG_INFO, "The symbol tags and information can be concise, as well.\n");
25 * print_log(LOG_WARNING, "That was an info message. This is a warning message.\n");
26 * print_log(LOG_ERROR, "And this is an error message.\n");
27 * print_log(LOG_ERROR, "And this is a critical message.\n");
28 * set_log_file("example.log");
29 * print_log(LOG_INFO, "Logs can also be automatically printed to files.\n");
31 * Author: Henry Eshbaugh <henryeshbaugh@gmail.com>
36 int main(int argc, char *argv[])
38 if (argc != 2) return 1;
39 if (strcmp(argv[1], "depends") == 0) return 0;