-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.lfg
More file actions
101 lines (86 loc) · 4.17 KB
/
example.lfg
File metadata and controls
101 lines (86 loc) · 4.17 KB
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
# each logger has its own section in config file.
# name of this section starts with predefined word 'logger' with dot '.' and name of logger after it.
# you can define in the file as many loggers as you need
# logger and sink names are case insensitive in file. it means that 'MainLogger' and 'mainlogger' are considered and name of one logger
[logger.mainLogger]
loglevel = debug
# there are may be many 'sink' parameters in logger section.
# each sink parameter contains name of the sink defined further in [sink.xx] sections in this file.
# during parsing all declared sinks will be added to the current logger.
# no limits on number of sinks (and sink types) to be added to the logger.
sink=s1
sink=s2
asyncmode=false
# this is logger with name 'second'
[logger.second]
LogLevel = warning
Sink=s3
Sink=s2
Sink=rotating
AsyncMode=true
# this section contains parameters of the sink
# s1 is sink will be added to MainLogger logger (see above)
[SINK.s1]
# there are 5 sink types: Stdout, Stderr, String, File, RotatingFile.
# they may contain different parameters.
# for example FileName parameter is valid for File, RotatingFile only.
Type=File
# This is file name for the sink. If file name contain spaces it needs to be in quotes?????
FileName = s1s1s1s1s1.log
# log level for the sink. This is second 'filter' for log messages. First such 'filter' is in Logger.
# with sink log level it is possble to send messages of different log levels into different files.
loglevel = trace
# note this sink is "connected" to two loggers
[Sink.s2]
# this sink sends error log messages to standard output
Type=STDout
LOGLEVEL=error
ThreadSafety = single
[SINK.s3]
Type=File
FileName = s3 s3 s3 s3.log
loglevel = trace
[sink.rotating]
Type=RotatingFile
FileName = RotatingLogfile.log
threadsafety= multi
# Rotating strategy. can be one of the following values
# None - no rotating. logs are written into specified log file without any rotating. In that case RotatingFile is fully equal to FileSink
# Single - only one .bak file is created when log file reaches MaxLogfileSize. Old .bak file is deleted.
# TimeStamp - .bak files are created with TimeStamp in the name. Unlimited number of such files can be created.
# Numbers - when log file reaches MaxLogfileSize, log file is renamed to <logfilename>.1.bak, existing <logfilename>.1.bak is renamed to <logfilename>.2.bak and so on.
# maximum number of numerated .bak files is MaxBackupIndex. Extra files are deleted.
Strategy = numbers
# Maximum log file size when new file will be started.
# Value can contain suffixes K, M, G that means kilobytes, megabytes and gigabytes
MaxLogfileSize = 6K
# Maximum number of "backup" files. Older files will be deleted
MaxBackupIndex = 5
#For any sink type it is possible to define error patterns for the message of each log level
# each pattern contains text with placeholders
# placeholders are replaced by actual values when sink writes log message
# full list of placeholders can be found below
ErrorPattern = ! %TIME% #%THREAD% : %MSG%
WarnPattern = # %TIME% #%THREAD% : %MSG%
CritPattern = *!* %TIME% #%THREAD% : %MSG%
# this is pattern for all log message levels
# use it when you do not need separate pattern for each log level.
PatternAll = !WOW! %TIME% #%THREAD% : %MSG%
#---------------------------------------------------------------------------------
# Log message patterns.
# Each pattern allows to set the format in which log information will be saved to the log file.
# Each pattern can be a combination of placeholders and free text.
# Letters that are not placeholders will be copied to the output stream without changing.
# The example of template line : '%TIME% #%THREAD% : %MSG%'
# NOTE! MACROS ARE CASE SENSITIVE AND MUST BE IN UPEER CASE.
# List of supported placeholders:
# %TIME% - current time
# %DATE% - current date
# %DATETIME% - the current date and time
# %THREAD% - ID of thread that generated this log message
# %MSG% - log message itself
# %LOGLEVEL% - log level for log message.
# %APPNAME% - the name of application
# %APPVERSION% - the version of application. Can have x.x.x.x format or other.
# %OS% - OS name (for example Microsoft Windows 10)
# %OSVERSION% - OS version number (for example "5.1.0.2666")