forked from HardySimpson/zlog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUsersGuide-EN.lyx
8076 lines (6378 loc) · 158 KB
/
UsersGuide-EN.lyx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#LyX 2.0 created this file. For more info see http://www.lyx.org/
\lyxformat 413
\begin_document
\begin_header
\textclass extbook
\use_default_options true
\begin_modules
theorems-ams
eqs-within-sections
figs-within-sections
\end_modules
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize 12
\spacing single
\use_hyperref true
\pdf_title "zlog Users Guide EN"
\pdf_author "Hardy Simpson"
\pdf_bookmarks true
\pdf_bookmarksnumbered true
\pdf_bookmarksopen true
\pdf_bookmarksopenlevel 1
\pdf_breaklinks true
\pdf_pdfborder true
\pdf_colorlinks true
\pdf_backref false
\pdf_pdfusetitle true
\papersize default
\use_geometry true
\use_amsmath 1
\use_esint 1
\use_mhchem 1
\use_mathdots 1
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\use_refstyle 0
\index 索引
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
\begin_layout Title
zlog
\begin_inset Foot
status collapsed
\begin_layout Plain Layout
A single spark can start a prairie fire -- Mao Zedong
\end_layout
\end_inset
User's Guide
\end_layout
\begin_layout Author
Hardy Simpson
\begin_inset Foot
status collapsed
\begin_layout Plain Layout
This Guide is for zlog v1.2.*
\end_layout
\end_inset
\begin_inset Foot
status collapsed
\begin_layout Plain Layout
If you have comments or error corrections, post
\begin_inset CommandInset href
LatexCommand href
name "a issue"
target "https://github.com/HardySimpson/zlog/issues/new"
\end_inset
on github, or write email to
\begin_inset CommandInset href
LatexCommand href
name "[email protected]"
target "[email protected]"
type "mailto:"
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset CommandInset toc
LatexCommand tableofcontents
\end_inset
\end_layout
\begin_layout Chapter
What is zlog?
\end_layout
\begin_layout Standard
zlog is a reliable, high-performance, thread safe, flexible, clear-model,
pure C logging library.
\end_layout
\begin_layout Standard
Actually, in the C world there was NO good logging library for applications
like logback in java or log4cxx in c++.
printf can work, but can not be redirected easily nor be reformatted.
syslog is slow and is designed for system use.
\end_layout
\begin_layout Standard
So I wrote zlog.
\end_layout
\begin_layout Standard
It is faster, safer and more powerful than log4c.
So it can be widely used.
\end_layout
\begin_layout Standard
zlog has these features:
\end_layout
\begin_layout Itemize
syslog model, better than log4j model
\end_layout
\begin_layout Itemize
log format customization
\end_layout
\begin_layout Itemize
multiple output, include static file path, dynamic file path, stdout, stderr,
syslog, user-defined ouput
\end_layout
\begin_layout Itemize
runtime with manual or automatic refresh of configuration (done safely)
\end_layout
\begin_layout Itemize
high-performance, 250'000 logs/second on my laptop, about 1000 times faster
than syslog(3) with rsyslogd
\end_layout
\begin_layout Itemize
user-defined log level
\end_layout
\begin_layout Itemize
safely rotate log file under multiple-process or multiple-thread conditions
\end_layout
\begin_layout Itemize
accurate to microseconds
\end_layout
\begin_layout Itemize
dzlog, a default category log API for easy use
\end_layout
\begin_layout Itemize
MDC, a log4j style key-value map
\end_layout
\begin_layout Itemize
self debuggable, can output zlog's self debug and error log at runtime
\end_layout
\begin_layout Itemize
Does not depend on any other 3rd party library, just base on POSIX system
(including pthread) and a C99 compliant vsnprintf.
\end_layout
\begin_layout Standard
Links:
\end_layout
\begin_layout Standard
Homepage:
\begin_inset CommandInset href
LatexCommand href
name "http://hardysimpson.github.com/zlog"
target "http://hardysimpson.github.com/zlog"
\end_inset
\end_layout
\begin_layout Standard
Downloads:
\begin_inset CommandInset href
LatexCommand href
target "https://github.com/HardySimpson/zlog/releases"
\end_inset
\end_layout
\begin_layout Standard
Author's Email:
\begin_inset CommandInset href
LatexCommand href
name "[email protected]"
target "[email protected]"
type "mailto:"
\end_inset
\end_layout
\begin_layout Section
Compatibility Notes
\end_layout
\begin_layout Enumerate
zlog is based on POSIX-compatible systems.
I have just GNU/linux and AIX environments to compile, test and run zlog.
Still, I think zlog will work well on FreeBSD, NetBSD, OpenBSD, OpenSolaris,
Mac OS X etc.
Test runs of zlog on any system are welcome.
\end_layout
\begin_layout Enumerate
zlog uses a feature of C99 compliant vsnprintf.
That is, if the buffer size of destination is not long enough, vsnprintf
will return the number of characters (not including the trailing '
\backslash
0') which would have been written to the final string if enough space had
been available.
If the vsnprintf on your system does not work like that, zlog can not know
the right buffer size when a single log is longer than the buffer.
Fortunately, glibc 2.1, libc on AIX, and libc on freebsd work correctly,
while glibc 2.0 does not.
In this case, user should crack zlog himself with a C99 compliant vsnprintf.
I suggest
\begin_inset CommandInset href
LatexCommand href
name "ctrio"
target "http://sourceforge.net/projects/ctrio/"
\end_inset
, or
\begin_inset CommandInset href
LatexCommand href
name "C99-snprintf"
target "http://www.jhweiss.de/software/snprintf.html"
\end_inset
.
The file buf.c should be cracked, good luck!
\end_layout
\begin_layout Enumerate
Some people offer versions of zlog for other platforms.
Thanks!
\end_layout
\begin_deeper
\begin_layout Standard
auto tools version:
\begin_inset CommandInset href
LatexCommand href
target "https://github.com/bmanojlovic/zlog"
\end_inset
\end_layout
\begin_layout Standard
cmake verion:
\begin_inset CommandInset href
LatexCommand href
target "https://github.com/lisongmin/zlog"
\end_inset
\end_layout
\begin_layout Standard
windows version:
\begin_inset CommandInset href
LatexCommand href
target "https://github.com/lopsd07/WinZlog"
\end_inset
\end_layout
\end_deeper
\begin_layout Section
zlog 1.2 Release Notes
\end_layout
\begin_layout Enumerate
zlog 1.2 provides these features:
\end_layout
\begin_deeper
\begin_layout Enumerate
support for pipeline.
Now zlog can send ouput log through programs like cronolog
\end_layout
\begin_layout Enumerate
Full rotation support, see
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Rotation"
\end_inset
\end_layout
\begin_layout Enumerate
Other code compatible details, bug fixes.
\end_layout
\end_deeper
\begin_layout Enumerate
zlog 1.2 is binary compatible with zlog 1.0.
The differences are:
\end_layout
\begin_deeper
\begin_layout Enumerate
All zlog macros like ZLOG_INFO are shifted to lowercase versions, zlog_info.
This big change is because I think it is easier for people to type.
If you are using a previous version of zlog, please use a script to substitute
all macros, and re-compile your program.
Here is an example:
\end_layout
\begin_layout LyX-Code
sed -i -e 's/
\backslash
b
\backslash
w*ZLOG
\backslash
w*
\backslash
b/
\backslash
L&
\backslash
E/g' aa.c
\end_layout
\begin_layout Enumerate
Auto tools compile is abandoned.
Auto tools is ugly so I dropped it.
A simple makefile is in use, which requires gcc and gnu make.
If this makefile does not work in your environment, you will need to write
a suitable makefile for yourself.
It should be quite easy for a geek.
\end_layout
\end_deeper
\begin_layout Chapter
What zlog is not
\end_layout
\begin_layout Standard
The goal of zlog is to be a simple, fast log library for applications.
It does not support output like sending the log to another machine through
the net or saving it to database.
It will not parse content of log and filter them.
\end_layout
\begin_layout Standard
The reason is obvious: the library is called by an application, so all time
taken by the log library is part of the application's time.
And database inserting or log content parsing takes a long time.
These will slow down the application.
These operation should be done in a different process or on a different
machine.
\end_layout
\begin_layout Standard
If you want all these features, I recommend rsyslog, zLogFabric, Logstash.
These have independent processes to receive logs from another process or
machine, and to parse and store logs.
These functions are separated from the user application.
\end_layout
\begin_layout Standard
Now
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:User-defined-Output"
\end_inset
is supported by zlog.
Just one output function need to be implemented: to transfer the log to
the other process or machine.
The work of category matching and log generating is left with the zlog
library.
\end_layout
\begin_layout Standard
One possibility is to write a zlog-redis client.
It send logs to redis on local or remote machines by user defined output.
Then other processes can read logs from redis and write to disk.
What do you think about this idea? I will be happy to discuss it with you.
\end_layout
\begin_layout Chapter
Hello World
\end_layout
\begin_layout Section
Build and Installation zlog
\end_layout
\begin_layout Standard
Download:
\begin_inset CommandInset href
LatexCommand href
target "https://github.com/HardySimpson/zlog/archive/latest-stable.tar.gz"
\end_inset
\end_layout
\begin_layout LyX-Code
$ tar -zxvf zlog-latest-stable.tar.gz
\end_layout
\begin_layout LyX-Code
$ cd zlog-latest-stable/
\end_layout
\begin_layout LyX-Code
$ make
\end_layout
\begin_layout LyX-Code
$ sudo make install
\end_layout
\begin_layout LyX-Code
or
\end_layout
\begin_layout LyX-Code
$ sudo make PREFIX=/usr/local/ install
\end_layout
\begin_layout Standard
PREFIX indicates where zlog is installed.
After installation, change system settings to make sure your program can
find the zlog library
\end_layout
\begin_layout LyX-Code
$ sudo vi /etc/ld.so.conf
\end_layout
\begin_layout LyX-Code
/usr/local/lib
\end_layout
\begin_layout LyX-Code
$ sudo ldconfig
\end_layout
\begin_layout Standard
Before running a real program, make sure libzlog.so is in the directory where
the system's dynamic lib loader can find it.
The commands mentioned above are for linux.
Other systems will need a similar set of actions.
\end_layout
\begin_layout Itemize
Beside the normal make, these are also available:
\end_layout
\begin_layout LyX-Code
$ make 32bit # 32bit version on 64bit machine, libc6-dev-i386 is needed
\end_layout
\begin_layout LyX-Code
$ make noopt # without gcc optimization
\end_layout
\begin_layout LyX-Code
$ make doc # lyx and hevea is needed
\end_layout
\begin_layout LyX-Code
$ make test # test code, which is also good example for zlog
\end_layout
\begin_layout Itemize
makefile of zlog is written in gnu make style.
So if your platform is not linux, install a gnu make and gcc before trying
to build zlog.
Another way is to write a makefile in your platform's make style.
This should be quite easy as zlog is not complicated.
\end_layout
\begin_layout Section
Call and Link zlog in User's application
\end_layout
\begin_layout Standard
To use zlog, add one line to the source c file or cpp file:
\end_layout
\begin_layout LyX-Code
#include "zlog.h"
\end_layout
\begin_layout Standard
zlog needs the pthread library.
The link command is:
\end_layout
\begin_layout LyX-Code
$ cc -c -o app.o app.c -I/usr/local/include
\end_layout
\begin_layout LyX-Code
# -I[where zlog.h is put]
\end_layout
\begin_layout LyX-Code
$ cc -o app app.o -L/usr/local/lib -lzlog -lpthread
\end_layout
\begin_layout LyX-Code
# -L[where libzlog.so]
\end_layout
\begin_layout Section
Hello World Example
\begin_inset CommandInset label
LatexCommand label
name "sec:Hello-World-Example"
\end_inset
\end_layout
\begin_layout Standard
This example can be found in $(top_builddir)/test/test_hello.c, test_hello.conf
\end_layout
\begin_layout Enumerate
Write a new c source file:
\end_layout
\begin_deeper
\begin_layout LyX-Code
$ vi test_hello.c
\end_layout
\begin_layout LyX-Code
#include <stdio.h>
\end_layout
\begin_layout LyX-Code
#include "zlog.h"
\end_layout
\begin_layout LyX-Code
\end_layout
\begin_layout LyX-Code
int main(int argc, char** argv)
\end_layout
\begin_layout LyX-Code
{
\end_layout
\begin_deeper
\begin_layout LyX-Code
int rc;
\end_layout
\begin_layout LyX-Code
zlog_category_t *c;
\end_layout
\begin_layout LyX-Code
\end_layout
\begin_layout LyX-Code
rc = zlog_init("test_hello.conf");
\end_layout
\begin_layout LyX-Code
if (rc) {
\end_layout
\begin_deeper
\begin_layout LyX-Code
printf("init failed
\backslash
n");
\end_layout
\begin_layout LyX-Code
return -1;
\end_layout
\end_deeper
\begin_layout LyX-Code
}
\end_layout
\begin_layout LyX-Code
\end_layout
\begin_layout LyX-Code
c = zlog_get_category("my_cat");
\end_layout
\begin_layout LyX-Code
if (!c) {
\end_layout
\begin_deeper
\begin_layout LyX-Code
printf("get cat fail
\backslash
n");
\end_layout
\begin_layout LyX-Code
zlog_fini();
\end_layout
\begin_layout LyX-Code
return -2;
\end_layout
\end_deeper
\begin_layout LyX-Code
}
\end_layout
\begin_layout LyX-Code
\end_layout
\begin_layout LyX-Code
zlog_info(c, "hello, zlog");
\end_layout
\begin_layout LyX-Code
zlog_fini();
\end_layout
\begin_layout LyX-Code
return 0;
\end_layout
\end_deeper
\begin_layout LyX-Code
}
\end_layout
\end_deeper
\begin_layout Enumerate
Write a configuration file in the same path as test_hello.c:
\end_layout
\begin_deeper
\begin_layout LyX-Code
$ vi test_hello.conf
\end_layout
\begin_layout LyX-Code
[formats]
\end_layout
\begin_layout LyX-Code
simple = "%m%n"
\end_layout
\begin_layout LyX-Code
[rules]
\end_layout
\begin_layout LyX-Code
my_cat.DEBUG >stdout; simple
\end_layout
\end_deeper
\begin_layout Enumerate
Compile and run it:
\end_layout
\begin_deeper
\begin_layout LyX-Code
$ cc -c -o test_hello.o test_hello.c -I/usr/local/include
\end_layout
\begin_layout LyX-Code
$ cc -o test_hello test_hello.o -L/usr/local/lib -lzlog
\end_layout
\begin_layout LyX-Code
$ ./test_hello
\end_layout
\begin_layout LyX-Code
hello, zlog
\end_layout
\end_deeper
\begin_layout Section
Simpler Hello World Example
\end_layout
\begin_layout Standard
This example can be found in $(top_builddir)/test/test_default.c, test_default.con
f.
The source code is
\end_layout
\begin_layout LyX-Code
#include <stdio.h>
\end_layout
\begin_layout LyX-Code
#include "zlog.h"
\end_layout
\begin_layout LyX-Code
int main(int argc, char** argv)
\end_layout
\begin_layout LyX-Code
{
\end_layout
\begin_deeper
\begin_layout LyX-Code
int rc;
\end_layout
\begin_layout LyX-Code
rc = dzlog_init("test_default.conf", "my_cat");
\end_layout
\begin_layout LyX-Code
if (rc) {
\end_layout
\begin_deeper
\begin_layout LyX-Code
printf("init failed
\backslash
n");
\end_layout
\begin_layout LyX-Code
return -1;
\end_layout
\end_deeper
\begin_layout LyX-Code
}
\end_layout
\begin_layout LyX-Code
dzlog_info("hello, zlog");
\end_layout
\begin_layout LyX-Code
zlog_fini();
\end_layout
\begin_layout LyX-Code
return 0;
\end_layout
\end_deeper
\begin_layout LyX-Code
}
\end_layout
\begin_layout Standard
The configure file test_default.conf is the same as test_hello.conf, and the
output of test_default is the same as that of test_hello.
The difference is that test_default uses the dzlog API, which has a default
\emph on
zlog_category_t
\emph default
inside and is easier to use.
See
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:dzlog-API"
\end_inset
for more details.
\end_layout
\begin_layout Chapter
Syslog model
\end_layout
\begin_layout Section
Category, Rule and Format
\end_layout
\begin_layout Standard
In zlog, there are 3 important concepts: category, rule and format.
\end_layout
\begin_layout Standard
Category specifies different kinds of log entries.
In the zlog source code, category is a (zlog_cateogory_t *) variable.
In your program, different categories for the log entries will distinguish
them from each other.
\end_layout
\begin_layout Standard
Format describes detail log patterns, such as: with or without time stamp,
source file, source line.
\end_layout
\begin_layout Standard
Rule consists of category, level, output file (or other channel) and format.
In brief, if the category string in a rule in the configuration file equals
the name of a category variable in the source, then they match.
\end_layout
\begin_layout Standard
So when this sentence in the source file is executed:
\end_layout
\begin_layout LyX-Code
zlog_category_t *c;
\end_layout
\begin_layout LyX-Code
c = zlog_get_category("my_cat");
\end_layout
\begin_layout LyX-Code
zlog_info(c, "hello, zlog");
\end_layout
\begin_layout Standard
zlog library uses the category name "my_cat" to match one rule in the configurat
ion file.
That is
\end_layout
\begin_layout LyX-Code
[rules]
\end_layout
\begin_layout LyX-Code
my_cat.DEBUG >stdout; simple
\end_layout
\begin_layout Standard
Then the library will check if level is correct to decide whether the log
will be output or not.
As INFO>=DEBUG the log will be output, and as the rule says, it will be
sent to stdout (standard output) in the format of simple, which is described
as
\end_layout
\begin_layout LyX-Code
[formats]
\end_layout
\begin_layout LyX-Code
simple = "%m%n"
\end_layout
\begin_layout Standard
Lastly, zlog will show the zlog_info() content on the screen
\end_layout
\begin_layout LyX-Code
hello, zlog
\end_layout
\begin_layout Standard
That's the whole story.
The only thing a user need to do is to write the messages.
Where the log will be output, or in which format, is done by zlog library.
\end_layout
\begin_layout Section
Differences between syslog model and log4j model
\end_layout
\begin_layout Standard
Does zLog have anything to do with syslog? Until now, the model is more
like log4j.
As in log4j, there are concepts of logger, appender and layout.
The difference is that in log4j, each logger in source code must correspond
to one logger in the configuration file and has just one definite level.
One-to-one relationship is the only choice for log4j, log4cxx, log4cpp,
log4cplus log4net and etc...
\end_layout
\begin_layout Standard
But the log4j model is NOT flexible, they invent filters to make up for
it, and that make things more worse.
So let's get back to syslog model, which has an excellent design.
\end_layout
\begin_layout Standard
Continuing our example from the last section, if the zlog configuration
file has 2 rules:
\end_layout
\begin_layout LyX-Code
[rules]
\end_layout
\begin_layout LyX-Code
my_cat.DEBUG >stdout; simple
\end_layout
\begin_layout LyX-Code
my_cat.INFO >stdout;
\end_layout
\begin_layout Standard
Then they will generate 2 log outputs to stdout:
\end_layout