forked from lbayle/codev
-
Notifications
You must be signed in to change notification settings - Fork 10
/
log4php.xml.sample
75 lines (61 loc) · 2.76 KB
/
log4php.xml.sample
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
<?xml version="1.0" encoding="UTF-8"?>
<!--
more info here:
http://logging.apache.org/log4php/docs/layouts/pattern.html
-->
<log4php:configuration xmlns:log4php="http://logging.apache.org/log4php/">
<appender name="myEchoAppender" class="LoggerAppenderEcho">
<layout class="LoggerLayoutSimple" />
<param name="htmlLineBreaks" value="1"/>
</appender>
<appender name="myConsoleAppender" class="LoggerAppenderConsole" />
<appender name="myRollingFileAppender" class="LoggerAppenderRollingFile">
<layout class="LoggerLayoutPattern">
<!--param name="conversionPattern" value="%d{Y-m-d H:i:s} %c %-5p %m (%F:%L) [%server{HTTP_X_FORWARDED_FOR}]%n" /-->
<param name="conversionPattern" value="%d{Y-m-d H:i:s} %c %-5p %m (%F:%L) [%server{REMOTE_ADDR}]%n" />
</layout>
<param name="file" value="@TAG_CODEVTT_LOGFILE_FULLPATH@" />
<param name="maxFileSize" value="2MB" />
<param name="maxBackupIndex" value="5" />
</appender>
<!-- Displaying file & line info (%F:%L) may be ressource consuming, use this appender for better performances -->
<appender name="myRollingFileAppenderLight" class="LoggerAppenderRollingFile">
<layout class="LoggerLayoutPattern">
<!--param name="conversionPattern" value="%d{Y-m-d H:i:s} %c %-5p %m [%server{HTTP_X_FORWARDED_FOR}]%n" /-->
<param name="conversionPattern" value="%d{Y-m-d H:i:s} %c %-5p %m [%server{REMOTE_ADDR}]%n" />
</layout>
<param name="file" value="@TAG_CODEVTT_LOGFILE_FULLPATH@" />
<param name="maxFileSize" value="2MB" />
<param name="maxBackupIndex" value="5" />
</appender>
<!-- TODO FIX override level does not work with root appender since upgrade to log4php 2.3.0 ?! -->
<logger name="login">
<level value="INFO" />
<appender_ref ref="myRollingFileAppenderLight" />
</logger>
<logger name="default">
<level value="INFO" />
<appender_ref ref="myRollingFileAppender" />
</logger>
<logger name="homepage">
<level value="INFO" />
<appender_ref ref="myRollingFileAppender" />
</logger>
<logger name="download">
<level value="INFO" />
<appender_ref ref="myRollingFileAppenderLight" />
</logger>
<logger name="Install">
<level value="DEBUG" />
<appender_ref ref="myRollingFileAppender" />
</logger>
<!-- this will log CLIENT Javascript errors in CodevTT SERVER logs. set level to DEBUG to get JS logs -->
<logger name="JsErrorCatch">
<level value="ERROR" />
<appender_ref ref="myRollingFileAppenderLight" />
</logger>
<root>
<level value="ERROR" />
<appender_ref ref="myRollingFileAppender" />
</root>
</log4php:configuration>