libsir
2.2.6
Standard Incident Reporter
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1
38
#ifndef _SIR_CONFIG_H_INCLUDED
39
# define _SIR_CONFIG_H_INCLUDED
40
52
# if !defined(SIR_TIMEFORMAT)
53
# define SIR_TIMEFORMAT "%H:%M:%S"
54
# endif
55
67
# if !defined(SIR_MSECFORMAT)
68
# define SIR_MSECFORMAT ".%03ld"
69
# endif
70
75
# if !defined(SIR_EOL_CR)
76
# define SIR_EOL_CR "\r"
77
# endif
78
82
# if !defined(SIR_EOL_LF)
83
# define SIR_EOL_LF "\n"
84
# endif
85
90
# if !defined(SIR_USE_EOL_CRLF)
91
# define SIR_EOL SIR_EOL_LF
92
# else
93
# define SIR_EOL SIR_EOL_CR SIR_EOL_LF
94
# endif
95
101
# if !defined(SIR_LEVELPREFIX)
102
# define SIR_LEVELPREFIX "["
103
# endif
104
110
# if !defined(SIR_LEVELSUFFIX)
111
# define SIR_LEVELSUFFIX "]"
112
# endif
113
119
# if !defined(SIR_PIDPREFIX)
120
# define SIR_PIDPREFIX "("
121
# endif
122
128
# if !defined(SIR_PIDSUFFIX)
129
# define SIR_PIDSUFFIX ")"
130
# endif
131
137
# if !defined(SIR_PIDFORMAT)
138
# define SIR_PIDFORMAT "%d"
139
# endif
140
146
# if !defined(SIR_TIDFORMAT)
147
# if defined(__USE_HEX_TIDS__)
148
# define SIR_TIDFORMAT "%x"
149
# else
150
# define SIR_TIDFORMAT "%d"
151
# endif
152
# endif
153
164
# if !defined(SIR_PIDSEPARATOR)
165
# define SIR_PIDSEPARATOR "."
166
# endif
167
169
# if !defined(SIR_FOPENMODE)
170
# define SIR_FOPENMODE "a"
171
# endif
172
177
# if !defined(SIR_FROLLSIZE)
178
# define SIR_FROLLSIZE (1024 * 1024 * 5)
179
# endif
180
191
# if !defined(SIR_FHTIMEFORMAT)
192
# define SIR_FHTIMEFORMAT "%H:%M:%S %a %d %b %Y (%z)"
193
# endif
194
208
# if !defined(SIR_FHFORMAT)
209
# define SIR_FHFORMAT SIR_EOL SIR_EOL "----- %s %s -----" SIR_EOL SIR_EOL
210
# endif
211
217
# if !defined(SIR_FHBEGIN)
218
# define SIR_FHBEGIN "session begin @"
219
# endif
220
229
# if !defined(SIR_FHROLLED)
230
# define SIR_FHROLLED "archived as %s due to size @"
231
# endif
232
241
# if !defined(SIR_FNAMETIMEFORMAT)
242
# define SIR_FNAMETIMEFORMAT "%Y-%m-%d-%H%M%S"
243
# endif
244
254
# if !defined(SIR_FNAMESEQFORMAT)
255
# define SIR_FNAMESEQFORMAT "-%hu"
256
# endif
257
278
# if !defined(SIR_FNAMEFORMAT)
279
# define SIR_FNAMEFORMAT "%s-%s%s%s"
280
# endif
281
283
# if !defined(SIRL_S_EMERG)
284
# define SIRL_S_EMERG "emrg"
285
# endif
286
288
# if !defined(SIRL_S_ALERT)
289
# define SIRL_S_ALERT "alrt"
290
# endif
291
293
# if !defined(SIRL_S_CRIT)
294
# define SIRL_S_CRIT "crit"
295
# endif
296
298
# if !defined(SIRL_S_ERROR)
299
# define SIRL_S_ERROR "erro"
300
# endif
301
303
# if !defined(SIRL_S_WARN)
304
# define SIRL_S_WARN "warn"
305
# endif
306
308
# if !defined(SIRL_S_NOTICE)
309
# define SIRL_S_NOTICE "noti"
310
# endif
311
313
# if !defined(SIRL_S_INFO)
314
# define SIRL_S_INFO "info"
315
# endif
316
318
# if !defined(SIRL_S_DEBUG)
319
# define SIRL_S_DEBUG "debg"
320
# endif
321
323
# if !defined(SIR_MAXFILES)
324
# define SIR_MAXFILES 16
325
# endif
326
328
# if !defined(SIR_MAXPLUGINS)
329
# define SIR_MAXPLUGINS 16
330
# endif
331
333
# if !defined(SIR_MAXFHEADER)
334
# define SIR_MAXFHEADER 128
335
# endif
336
341
# if !defined(SIR_MAXMESSAGE)
342
# define SIR_MAXMESSAGE 4096
343
# endif
344
346
# if !defined(SIR_MAXTIME)
347
# define SIR_MAXTIME 64
348
# endif
349
351
# if !defined(SIR_MAXMSEC)
352
# define SIR_MAXMSEC 5
353
# endif
354
356
# if !defined(SIR_MAXLEVEL)
357
# define SIR_MAXLEVEL 7
358
# endif
359
364
# if !defined(SIR_MAXNAME)
365
# define SIR_MAXNAME 32
366
# endif
367
372
# if !defined(SIR_MAX_SYSLOG_ID)
373
# define SIR_MAX_SYSLOG_ID 128
374
# endif
375
380
# if !defined(SIR_MAX_SYSLOG_CAT)
381
# define SIR_MAX_SYSLOG_CAT 64
382
# endif
383
385
# if !defined(SIR_MAXMISC)
386
# define SIR_MAXMISC 7
387
# endif
388
394
# if !defined(SIR_NO_TEXT_STYLING)
395
# if !defined(SIR_MAXSTYLE)
396
# if !defined(SIR_USE_EOL_CRLF)
397
# define SIR_MAXSTYLE 43
398
# else
399
# define SIR_MAXSTYLE 44
400
# endif
401
# endif
402
# else
403
# if !defined(SIR_MAXSTYLE)
404
# if !defined(SIR_USE_EOL_CRLF)
405
# define SIR_MAXSTYLE 1
406
# else
407
# define SIR_MAXSTYLE 2
408
# endif
409
# endif
410
# endif
411
413
# define SIR_MAXOUTPUT \
414
(SIR_MAXMESSAGE + (SIR_MAXSTYLE * 2) + SIR_MAXTIME + SIR_MAXLEVEL + \
415
SIR_MAXNAME + (SIR_MAXPID * 2) + SIR_MAXMISC + 2 + 1)
416
418
# if !defined(SIR_MAXERROR)
419
# define SIR_MAXERROR 256
420
# endif
421
435
# define SIR_ERRORFORMAT "Error in %s (%s:%u): '%s'"
436
438
# if !defined(SIR_UNKNOWN)
439
# define SIR_UNKNOWN "<unknown>"
440
# endif
441
443
# if !defined(SIR_DESTNAME_STDERR)
444
# define SIR_DESTNAME_STDERR "stderr"
445
# endif
446
448
# if !defined(SIR_DESTNAME_STDOUT)
449
# define SIR_DESTNAME_STDOUT "stdout"
450
# endif
451
453
# if !defined(SIR_DESTNAME_SYSLOG)
454
# define SIR_DESTNAME_SYSLOG "syslog"
455
# endif
456
458
# if !defined(SIR_FALLBACK_SYSLOG_ID)
459
# define SIR_FALLBACK_SYSLOG_ID "libsir"
460
# endif
461
463
# if !defined(SIR_FALLBACK_SYSLOG_CAT)
464
# define SIR_FALLBACK_SYSLOG_CAT "general"
465
# endif
466
471
# define SIR_NUMLEVELS 8
472
477
# define SIR_NUMOPTIONS 8
478
483
# if !defined(SIR_HNAME_CHK_INTERVAL)
484
# define SIR_HNAME_CHK_INTERVAL 60
485
# endif
486
491
# if !defined(SIR_THRD_CHK_INTERVAL)
492
# define SIR_THRD_CHK_INTERVAL 333.0
493
# endif
494
499
# if !defined(SIR_FILE_CHK_SIZE_WRITES)
500
# define SIR_FILE_CHK_SIZE_WRITES 10
501
# endif
502
503
# if defined(SIR_OS_LOG_ENABLED)
509
# if !defined(SIR_OS_LOG_FORMAT)
510
# define SIR_OS_LOG_FORMAT "%{public}s"
511
# endif
512
# endif
513
519
# if !defined(SIR_SQUELCH_THRESHOLD)
520
# define SIR_SQUELCH_THRESHOLD 5
521
# endif
522
528
# if !defined(SIR_SQUELCH_BACKOFF_FACTOR)
529
# define SIR_SQUELCH_BACKOFF_FACTOR 2
530
# endif
531
536
# if !defined(SIR_SQUELCH_MSG_FORMAT)
537
# define SIR_SQUELCH_MSG_FORMAT "previous message repeated %zu times"
538
# endif
539
540
#endif
/* !_SIR_CONFIG_H_INCLUDED */
include
sir
config.h
Generated by
1.12.0