aboutsummaryrefslogtreecommitdiffstats
path: root/examples/print-options.c
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2018-04-13 13:48:45 +0200
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2018-04-13 13:48:45 +0200
commit9fe943c7085fd15e8a76237e363c9193e909ec7c (patch)
tree8de89f040f0498e4b7e57fc63da728da94476e4a /examples/print-options.c
parent52ee08352922701278a9204e31f6325325cf69d4 (diff)
downloadembedlog-9fe943c7085fd15e8a76237e363c9193e909ec7c.tar.gz
embedlog-9fe943c7085fd15e8a76237e363c9193e909ec7c.tar.bz2
embedlog-9fe943c7085fd15e8a76237e363c9193e909ec7c.zip
add: option to *NOT* print new lines with each message
Diffstat (limited to 'examples/print-options.c')
-rw-r--r--examples/print-options.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/print-options.c b/examples/print-options.c
index 97f5651..0ea88a4 100644
--- a/examples/print-options.c
+++ b/examples/print-options.c
@@ -15,7 +15,7 @@ int main(void)
el_option(EL_OUT, EL_OUT_STDERR);
el_option(EL_PRINT_LEVEL, 0);
- el_print(ELI, "We can disable information about log level");
+ el_print(ELI, "We can disable information about log level\b");
el_print(ELF, "message still will be filtered by log level");
el_print(ELA, "but there is no way to tell what level message is");
el_print(ELD, "like this message will not be printed");
@@ -51,6 +51,12 @@ int main(void)
el_print(ELF, "Different scenarios need different options");
el_print(ELA, "So we can mix options however we want");
+ el_option(EL_PRINT_NL, 0);
+ el_print(ELF, "you can also remove printing new line ");
+ el_puts("to join el_print and el_puts in a single ");
+ el_puts("long line as needed\n");
+ el_option(EL_PRINT_NL, 1);
+
el_option(EL_COLORS, 1);
el_option(EL_LEVEL, EL_DBG);
el_print(ELD, "And if we have");