summaryrefslogtreecommitdiff
path: root/common/elapi/elapi_test/elapi_ut.conf
blob: a42045a2457149d29c72398345bc78025c303fde (plain)
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
; This is a sample configuration file for ELAPI

; The dispatcher section defines general configuration
; for the ELAPI. It has following configuration parameters:
;
; targets - (required)
;           Defines possible logical destinations where message can be sent.
;           It is one of the arguments of the calling interface. It is numeric.
;           It is done this way for performance reasons so it is faster to compare.
;           But in the configuration it is easier to deal with targets as strings.
;           To overcome this issue each target is assigned a number in the INI file.
;           The ELAPI convention is to have three default targets:
;           "debug", "audit" and "log" but application developers can add others as needed.
;           The default value for debug target is 1, for audit 2 and log is 4.
;           Changing the value defined for debug to be 7 ( logical OR of 1, 2 and 4)
;           will result in all messages sent into debug log.
;           This might be convenient during troubleshooting and would allow seeing all
;           events emitted by the application in one place.
;           If you want the event to be sent into two targets at the same time
;           add a target with different name but same value.
;           For example if the log events need to go to local and remote files
;           in parallel you would create another target: logremote
;           and give it same value as log (which by convention is 4)



[dispatcher]
targets=debug, audit, log

; Inside section for each target the following parameters can be defined:
;
; value - (optional)
;         Stores the value associated with this target.
;         If the bit-wise AND of this value and the value provided by caller
;         of the interface is greater than 0 the event is logged into the
;         target destination. If omitted all events are sent to this target.
; sinks - (required)
;         Defines the list of the sink names that need to be loaded
;         each will have its own section.
;         Only one of the sinks is active - first in the list.
;         The list contains sinks in the fail over order.
;

[debug]
value = 1
sinks = debugfile, screen

[audit]
value = 2
sinks = auditfile, syslog

[log]
value = 4
sinks = logfile, syslog

; Each sink needs to have it's own section.
;
; COMMON FOR EVERY SINK
;
; provider - (required)
;            Defines the name of the sink or the special reserved word to
;            indicate that it is a sink provided by ELAPI library.
;
;            Special sinks provided by ELAPI are:
;             file
;             syslog
;
;            Example:
;            provider=file
;
;            this would mean the destination for this sink is a file.
;
;            If the sink is provided as an external plugin
;            the syntax should be the following:
;
;            provider=custom_audit
;
;            In this case the ELAPI will try to load shared library with the name
;            constructed using specified value. In the given example
;            ELAPI will try to load libelapi_sink_custom_audit.so library.
;            The general pattern is: libelapi_sink_<provider>.so
;
; required - (optional)
;            Defines whether it is a required sink?
;            If not present the dispatcher will return error at load time.
;
; onerror -  if the sink got an error what should dispatcher do?
;             0 - retry (default)
;             1 - disable
;
; timeout -  for how long one should wait before trying to revive the sink
;            default is 60 seconds
;
; synch -    yes/no (default no) - a flag that forces the sink to act synchronously
;                                  even if it can support async operations.
;            If application needs to have some events with guaranteed delivery
;            and wishes to block for those the implementation should
;            send such events to a special target that would consist
;            of the sinks that act in the synch mode and guarantee
;            the delivery or return failure.

; SPECIFIC CONFIGURATION PARAMETERS FOR DIFFERENT PROVIDERS
;
; 1) FILE PROVIDER
;
; filename - name of the log file. If not specified <appname>.log will be used.
;            Avoid using the same name of the file for different sinks,
;            the result might be unpredictable.
;            If file name is "stderr" the output will be sent to file descriptor 2.
;            If application closed file descriptor 2 the log attempt will
;            cause error and onerror value for the sink will be ignored.
;            The sink will be permanently disabled causing ELAPI to skip
;            it.
;            The "keepopen" and "fsyncmode" parameters are ignored for
;            "stderr" sink.
;
; keepopen - yes/no (default no) - keep file open
;
; outmode - 0 - CSV like (default)
;           1 - use format specifier
;           2 - HTML
;           3 - XML
;           4 - JSON
;           5 - key-value pairs
;
; set -     use only specific subset of fields in the given order
;           comma separated list of field names that are expected from
;           an event
;           The set can optionally end with an item:
;           @  - this would indicate that all the rest of the fields need to
;                be added at the end as separate fields.
;           @n - where n is one of the modes from "outmode" list.
;                in this case the all remaining fields will be jammed into one field
;                using specified format. In case of CSV jammed into CSV it is recommended
;                to use qualifier and set cvsescape to true
;           If the @ sign is absent only fields from the specified set will be
;           included into the output.
;           If event does not contain a specific field it will be empty in the output.
;
; fsyncmode - Defines if the data needs to be flushed to disk and how frequently
;             If this value is missing or 0 - no flushing.
;             If it is positive it denotes the number of events before next flush.
;             If it is negative it denotes the number of seconds before next flush.
;             Ignored if file is opened and closed each time.
;
; marker    - (optional)
;             Default is "\n".
;             Marker specifies a line that will be inserted into the file to denote
;             the beginning of a new run. The provided string is used as is
;             as a format argument for the strftime() function. The string can
;             contain zero or one time stamp format specifier listed in a man page
;             for the strftime function(). Providing an invalid marker can
;             potentially cause your application to crash.
;
;
; Format specific parameters:
;
; CSV related parameters (all optional):
;
; csvqual    - what to use as string qualifier for CSV outmode.
;              One character string.
;              If empty no qualifier is used.
;              If not specified then double quote is used.
; csvsep     - what to use as CSV field separator.
;              One character string.
;              If empty no separator is used.
;              If not specified comma is used.
; csvescsym  - which symbol to use as escape symbol.
;              One character string.
;              If empty or no qualifier no escaping is done.
;              If missing the "\" (backslash) is used.
;              Escaping is done only if both the qualifier
;              and the escape symbol are not empty.
; csvspace   - what to use as space after the separator. Default is space.
;              use "space" for space
;              use "tab" for tab
;              use "cr" for new line
;              Other value would cause an error.
; csvnumsp   - number of space characters to use. Default is 1.
; csvheader  - yes/no (default no). Include header into csv file.
;              Respected only if the "set" is explicitely defined.
;
;
; HTML related parameters
;
; htmlheader - create header row
;              ... TO BE Continued...

[debugfile]
provider=file
required=true
onerror=1
timeout=90

[logfile]
provider=file
required=true
onerror=0
timeout=60

[auditfile]
provider=file
required=true
onerror=1
timeout=90

[screen]
provider=file
filename=stderr
keepopen=false
synch=false
onerror=0
fsyncmode=-10
set=a, b, c, @0

[syslog]
provider=syslog
synch=yes