forked from HardySimpson/zlog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzlog.conf.example
57 lines (46 loc) · 1.49 KB
/
zlog.conf.example
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
[global]
strict init = true
default format = "%d %V [%p:%F:%L] %m%n"
default file permission = 600
rotate lock file = self
reload conf = 3600 # reload configure file once every 3600 second
buffer size = 8192 # flush zlog's buffer to write(2) kernel buffer, default BUFSIZ of stdio.h
fsync write = 1000 # fsync(2) kernel buffer to disc once every 1000 times of write(2) for each file
# once every 30 second on most linux
[deepness]
# sign = permisson, buffer size, flush len, flush count, fsync count
+ = 600, 10KB, 8KB, 20, 1000
- = 600, 10KB, 1KB, 1, 20
[levels]
TRACE = 10
CRIT = 130, LOG_CRIT
[formats]
simple = "%m%n"
normal = "%d(%F %T.%l) %m%n"
[default_cat.*]
file = "/dev/stdout"
format = simple
[*.*]
file path = -"%12.2E(HOME)/log/%c.log"
file path = +"%12.2E(HOME)/log/%c.log"
file permission = 0777
archive size = 1MB
archive number = 12
archive path = "%E(HOME)/log/%c.%D(%F) #2r #3s.log"
format = "%d %m%n"
[my_cat.!ERROR]
syslog facility = LOG_USER
[my_dog.=DEBUG]
pipe = /usr/bin/cronolog /www/logs/example_%Y%m%d.log
format = normal
[my_mice.*]
function = record_func
argv = "record_path%c"
[rules]
default.* >stdout; simple
*.* -"%12.2E(HOME)/log/%c.log", 1MB * 12 ~ "%E(HOME)/log/%c.%D(%F) #2r #3s.log"; simple
my_.info stderr;
my_cat.!ERROR "aa.log"
my_dog.=DEBUG >syslog, LOG_LOCAL0; simple
my_dog.=DEBUG | /usr/bin/cronolog /www/logs/example_%Y%m%d.log ; normal
my_mice.* $record_func , "record_path%c"; normal