forked from jayallen/mt-plugin-log4mt
-
Notifications
You must be signed in to change notification settings - Fork 3
/
log4mt.conf
executable file
·132 lines (110 loc) · 6.01 KB
/
log4mt.conf
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
# Log4MT configuration file
# AUTHOR: Jay Allen, Endevver LLC
# See README.txt in this package for more details
#
# QUICKSTART: Simply specify a path to your preferred location for the Log4MT
# log file (see log_file below). This file will be used exclusively
# for output using the default settings.
####
# IMPORTANT NOTE: Please place **ALL** module-specific logger level settings at the _very_ bottom of
# this file. Rationale:
#
# * Maintains a healthy separation between the well-tested default config settings that, in most
# cases, shouldn't be modified, from the module-specific logger level settings that are
# constantly being added, modified and deleted by any number of developers.
# * Makes it incredibly easy (Go to EOF) to navigate to the settings; no searching/scrolling/paging down
# * Makes it effortless to add a new directive without even opening the file:
# $ echo "..." >> log4mt.conf
# * Likewise, it is far easier to check the settings without needing to open the file:
# $ tail -30 log4mt.conf
####
######################
# LOG FILE PATH #
######################
# The setting below defines the absolute path to your desired location for the
# Log4MT log file. This file should exist and have permissions that allow MT
# to write to it. If in doubt, use 777 (or "rwxrwxrwx").
log_file = /PATH/TO/log4mt.log
####################
# ROOT LOGGER #
####################
# The following sets the root logger's level to TRACE (the lowest/noisest level)
# and attaches appenders for output to the log file, the standard error log and
# the activity log.
log4perl.logger = TRACE, Marker, File, Errorlog, MTLog
######################
# LAYOUT DEFINITIONS #
######################
layout_class = Log::Log4perl::Layout::PatternLayout::Multiline
layout_stderr = %p> %m (in %M() %F, line %L)%n
layout_pattern_dated = %d %p> %c %M{1} (%L) | %m%n
layout_pattern_minimal = %m%n
layout_pattern_trace = %d %p> ######################### "%c %M{1} (%L)" #########################%n%d %p> %m [[ Caller: %l ]]%n
#######################
### Marker appender ###
#######################
log4perl.filter.TraceOnly = Log::Log4perl::Filter::LevelMatch
log4perl.filter.TraceOnly.LevelToMatch = TRACE
log4perl.filter.TraceOnly.AcceptOnMatch = true
log4perl.appender.Marker = Log::Log4perl::Appender::File
log4perl.appender.Marker.filename = ${log_file}
log4perl.appender.Marker.mode = append
log4perl.appender.Marker.umask = 0000
log4perl.appender.Marker.recreate = 1
log4perl.appender.Marker.utf8 = 1
log4perl.appender.Marker.layout = ${layout_class}
log4perl.appender.Marker.layout.ConversionPattern = ${layout_pattern_trace}
log4perl.appender.Marker.Filter = TraceOnly
#####################
### File appender ###
#####################
log4perl.appender.File = Log::Log4perl::Appender::File
log4perl.appender.File.filename = ${log_file}
log4perl.appender.File.mode = append
log4perl.appender.File.umask = 0000
log4perl.appender.File.recreate = 1
log4perl.appender.File.utf8 = 1
log4perl.appender.File.layout = ${layout_class}
log4perl.appender.File.layout.ConversionPattern = ${layout_pattern_dated}
log4perl.appender.File.Threshold = DEBUG
#######################
### Stderr appender ###
#######################
log4perl.appender.Errorlog = Log::Log4perl::Appender::Screen
log4perl.appender.Errorlog.stderr = 1
log4perl.appender.Errorlog.utf8 = 1
log4perl.appender.Errorlog.layout = ${layout_class}
log4perl.appender.Errorlog.layout.ConversionPattern = ${layout_stderr}
log4perl.appender.Errorlog.Threshold = WARN
######################
### MTLog appender ###
######################
log4perl.appender.MTLogUnbuffered = MT::Log::Log4perl::Appender::MT
log4perl.appender.MTLogUnbuffered.warp_message = 0
log4perl.appender.MTLogUnbuffered.utf8 = 1
log4perl.appender.MTLogUnbuffered.layout = Log::Log4perl::Layout::NoopLayout
log4perl.appender.MTLog = MT::Log::Log4perl::Appender::MT::Buffer
log4perl.appender.MTLog.Threshold = ERROR
log4perl.appender.MTLog.appender = MTLogUnbuffered
log4perl.appender.MTLog.utf8 = 1
log4perl.logger.mtlog = DEBUG, MTLog
##########$############
### MTMail appender ###
###########$###########
log4perl.appender.MTMailUnbuffered = MT::Log::Log4perl::Appender::MT::Mail
log4perl.appender.MTMailUnbuffered.warp_message = 0
log4perl.appender.MTMailUnbuffered.layout = Log::Log4perl::Layout::NoopLayout
log4perl.appender.MTMailUnbuffered.utf8 = 1
# log4perl.appender.MTMail.default_sender = me@example.com
# log4perl.appender.MTMail.default_recipient = newticket@ticketsystem.com
log4perl.appender.MTMail = MT::Log::Log4perl::Appender::MT::Buffer
log4perl.appender.MTMail.utf8 = 1
log4perl.appender.MTMail.appender = MTMailUnbuffered
log4perl.logger.mtmail = DEBUG, MTMail
log4perl.additivity.mtmail = 0
################## Log4MT Diagnostic output setting ##################
# - WARN - No debugging and diagnostic output
# - INFO - Provides a shallow dump of the incoming application query
# - DEBUG - The above, plus outgoing template parameter values
log4perl.logger.Log4MT.Plugin = DEBUG
#################### Other logged modules ###########################