log4r 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +3 -3
- data/Rakefile +3 -3
- data/doc/rdoc-log4r.css +696 -0
- data/examples/syslogcustom.rb +6 -1
- data/src/doc/Log4r.html +392 -0
- data/src/doc/Log4r/BasicFormatter.html +370 -0
- data/src/doc/Log4r/ConfigError.html +207 -0
- data/src/doc/Log4r/Configurator.html +1050 -0
- data/src/doc/Log4r/DateFileOutputter.html +454 -0
- data/src/doc/Log4r/DefaultFormatter.html +205 -0
- data/src/doc/Log4r/EmailOutputter.html +636 -0
- data/src/doc/Log4r/FileOutputter.html +321 -0
- data/src/doc/Log4r/Formatter.html +291 -0
- data/src/doc/Log4r/IOOutputter.html +392 -0
- data/src/doc/Log4r/Log4rConfig.html +193 -0
- data/src/doc/Log4r/Log4rTools.html +370 -0
- data/src/doc/Log4r/LogEvent.html +360 -0
- data/src/doc/Log4r/LogServer.html +322 -0
- data/src/doc/Log4r/Logger.html +1132 -0
- data/src/doc/Log4r/Logger/LoggerFactory.html +200 -0
- data/src/doc/Log4r/Logger/Repository.html +207 -0
- data/src/doc/Log4r/ObjectFormatter.html +262 -0
- data/src/doc/Log4r/Outputter.html +910 -0
- data/src/doc/Log4r/Outputter/OutputterFactory.html +200 -0
- data/src/doc/Log4r/Outputter/consoleoutputters_rb.html +57 -0
- data/src/doc/Log4r/Outputter/datefileoutputter_rb.html +93 -0
- data/src/doc/Log4r/Outputter/emailoutputter_rb.html +179 -0
- data/src/doc/Log4r/Outputter/fileoutputter_rb.html +64 -0
- data/src/doc/Log4r/Outputter/iooutputter_rb.html +59 -0
- data/src/doc/Log4r/Outputter/outputter_rb.html +222 -0
- data/src/doc/Log4r/Outputter/outputterfactory_rb.html +62 -0
- data/src/doc/Log4r/Outputter/remoteoutputter_rb.html +59 -0
- data/src/doc/Log4r/Outputter/rollingfileoutputter_rb.html +66 -0
- data/src/doc/Log4r/Outputter/staticoutputter_rb.html +55 -0
- data/src/doc/Log4r/Outputter/syslogoutputter_rb.html +110 -0
- data/src/doc/Log4r/Outputter/tst_rb.html +54 -0
- data/src/doc/Log4r/PatternFormatter.html +422 -0
- data/src/doc/Log4r/ROMPClient.html +193 -0
- data/src/doc/Log4r/ROMPServer.html +193 -0
- data/src/doc/Log4r/RemoteOutputter.html +384 -0
- data/src/doc/Log4r/RollingFileOutputter.html +528 -0
- data/src/doc/Log4r/RootLogger.html +512 -0
- data/src/doc/Log4r/SimpleFormatter.html +258 -0
- data/src/doc/Log4r/StderrOutputter.html +250 -0
- data/src/doc/Log4r/StdoutOutputter.html +250 -0
- data/src/doc/Log4r/SyslogOutputter.html +533 -0
- data/src/doc/Log4r/YamlConfigurator.html +948 -0
- data/src/doc/Log4r/base_rb.html +57 -0
- data/src/doc/Log4r/config_rb.html +76 -0
- data/src/doc/Log4r/configurator_rb.html +370 -0
- data/src/doc/Log4r/formatter/formatter_rb.html +121 -0
- data/src/doc/Log4r/formatter/patternformatter_rb.html +233 -0
- data/src/doc/Log4r/lib/drbloader_rb.html +57 -0
- data/src/doc/Log4r/lib/xmlloader_rb.html +57 -0
- data/src/doc/Log4r/logevent_rb.html +55 -0
- data/src/doc/Log4r/logger_rb.html +293 -0
- data/src/doc/Log4r/loggerfactory_rb.html +66 -0
- data/src/doc/Log4r/logserver_rb.html +161 -0
- data/src/doc/Log4r/rdoc/configurator.html +444 -0
- data/src/doc/Log4r/rdoc/emailoutputter.html +261 -0
- data/src/doc/Log4r/rdoc/formatter.html +200 -0
- data/src/doc/Log4r/rdoc/log4r.html +268 -0
- data/src/doc/Log4r/rdoc/logger.html +364 -0
- data/src/doc/Log4r/rdoc/logserver.html +247 -0
- data/src/doc/Log4r/rdoc/outputter.html +295 -0
- data/src/doc/Log4r/rdoc/patternformatter.html +313 -0
- data/src/doc/Log4r/rdoc/syslogoutputter.html +179 -0
- data/src/doc/Log4r/rdoc/yamlconfigurator.html +169 -0
- data/src/doc/Log4r/repository_rb.html +62 -0
- data/src/doc/Log4r/staticlogger_rb.html +55 -0
- data/src/doc/Log4r/yamlconfigurator_rb.html +95 -0
- data/src/doc/REXML.html +193 -0
- data/src/doc/created.rid +1 -0
- data/src/doc/images/brick.png +0 -0
- data/src/doc/images/brick_link.png +0 -0
- data/src/doc/images/bug.png +0 -0
- data/src/doc/images/bullet_black.png +0 -0
- data/src/doc/images/bullet_toggle_minus.png +0 -0
- data/src/doc/images/bullet_toggle_plus.png +0 -0
- data/src/doc/images/date.png +0 -0
- data/src/doc/images/find.png +0 -0
- data/src/doc/images/loadingAnimation.gif +0 -0
- data/src/doc/images/macFFBgHack.png +0 -0
- data/src/doc/images/package.png +0 -0
- data/src/doc/images/page_green.png +0 -0
- data/src/doc/images/page_white_text.png +0 -0
- data/src/doc/images/page_white_width.png +0 -0
- data/src/doc/images/plugin.png +0 -0
- data/src/doc/images/ruby.png +0 -0
- data/src/doc/images/tag_green.png +0 -0
- data/src/doc/images/wrench.png +0 -0
- data/src/doc/images/wrench_orange.png +0 -0
- data/src/doc/images/zoom.png +0 -0
- data/src/doc/index.html +384 -0
- data/src/doc/js/darkfish.js +116 -0
- data/src/doc/js/jquery.js +32 -0
- data/src/doc/js/quicksearch.js +114 -0
- data/src/doc/js/thickbox-compressed.js +10 -0
- data/src/doc/rdoc.css +696 -0
- data/src/log4r.rb +2 -2
- data/src/log4r/formatter/patternformatter.rb +18 -2
- data/src/log4r/logger.rb +2 -2
- data/src/log4r/outputter/emailoutputter.rb +2 -0
- data/src/log4r/outputter/syslogoutputter.rb +29 -9
- data/src/log4r/outputter/tst.rb +8 -0
- metadata +99 -3
- data/examples/logs/simple.log +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
4
|
+
|
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
6
|
+
<head>
|
|
7
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
8
|
+
|
|
9
|
+
<title>File: rollingfileoutputter.rb [1.1.2 Log4r API Documentation]</title>
|
|
10
|
+
|
|
11
|
+
<link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet" />
|
|
12
|
+
|
|
13
|
+
<script src="../../js/jquery.js" type="text/javascript"
|
|
14
|
+
charset="utf-8"></script>
|
|
15
|
+
<script src="../../js/thickbox-compressed.js" type="text/javascript"
|
|
16
|
+
charset="utf-8"></script>
|
|
17
|
+
<script src="../../js/quicksearch.js" type="text/javascript"
|
|
18
|
+
charset="utf-8"></script>
|
|
19
|
+
<script src="../../js/darkfish.js" type="text/javascript"
|
|
20
|
+
charset="utf-8"></script>
|
|
21
|
+
</head>
|
|
22
|
+
|
|
23
|
+
<body class="file file-popup">
|
|
24
|
+
<div id="metadata">
|
|
25
|
+
<dl>
|
|
26
|
+
<dt class="modified-date">Last Modified</dt>
|
|
27
|
+
<dd class="modified-date">Thu Mar 18 19:31:10 -0800 2004</dd>
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
<dt class="requires">Requires</dt>
|
|
31
|
+
<dd class="requires">
|
|
32
|
+
<ul>
|
|
33
|
+
|
|
34
|
+
<li>log4r/outputter/fileoutputter</li>
|
|
35
|
+
|
|
36
|
+
<li>log4r/staticlogger</li>
|
|
37
|
+
|
|
38
|
+
<li>log4r</li>
|
|
39
|
+
|
|
40
|
+
</ul>
|
|
41
|
+
</dd>
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
</dl>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div id="documentation">
|
|
49
|
+
|
|
50
|
+
<div class="description">
|
|
51
|
+
<h2>Description</h2>
|
|
52
|
+
<p>
|
|
53
|
+
:nodoc:
|
|
54
|
+
</p>
|
|
55
|
+
<table>
|
|
56
|
+
<tr><td valign="top">Version:</td><td>$Id: rollingfileoutputter.rb,v 1.1.1.1 2004/03/19 03:31:10 fando Exp $
|
|
57
|
+
|
|
58
|
+
</td></tr>
|
|
59
|
+
</table>
|
|
60
|
+
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
</div>
|
|
64
|
+
</body>
|
|
65
|
+
</html>
|
|
66
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
4
|
+
|
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
6
|
+
<head>
|
|
7
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
8
|
+
|
|
9
|
+
<title>File: staticoutputter.rb [1.1.2 Log4r API Documentation]</title>
|
|
10
|
+
|
|
11
|
+
<link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet" />
|
|
12
|
+
|
|
13
|
+
<script src="../../js/jquery.js" type="text/javascript"
|
|
14
|
+
charset="utf-8"></script>
|
|
15
|
+
<script src="../../js/thickbox-compressed.js" type="text/javascript"
|
|
16
|
+
charset="utf-8"></script>
|
|
17
|
+
<script src="../../js/quicksearch.js" type="text/javascript"
|
|
18
|
+
charset="utf-8"></script>
|
|
19
|
+
<script src="../../js/darkfish.js" type="text/javascript"
|
|
20
|
+
charset="utf-8"></script>
|
|
21
|
+
</head>
|
|
22
|
+
|
|
23
|
+
<body class="file file-popup">
|
|
24
|
+
<div id="metadata">
|
|
25
|
+
<dl>
|
|
26
|
+
<dt class="modified-date">Last Modified</dt>
|
|
27
|
+
<dd class="modified-date">Thu Mar 18 19:31:10 -0800 2004</dd>
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
<dt class="requires">Requires</dt>
|
|
31
|
+
<dd class="requires">
|
|
32
|
+
<ul>
|
|
33
|
+
|
|
34
|
+
</ul>
|
|
35
|
+
</dd>
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
</dl>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div id="documentation">
|
|
43
|
+
|
|
44
|
+
<div class="description">
|
|
45
|
+
<h2>Description</h2>
|
|
46
|
+
<p>
|
|
47
|
+
:nodoc:
|
|
48
|
+
</p>
|
|
49
|
+
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
</div>
|
|
53
|
+
</body>
|
|
54
|
+
</html>
|
|
55
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
4
|
+
|
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
6
|
+
<head>
|
|
7
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
8
|
+
|
|
9
|
+
<title>File: syslogoutputter.rb [1.1.2 Log4r API Documentation]</title>
|
|
10
|
+
|
|
11
|
+
<link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet" />
|
|
12
|
+
|
|
13
|
+
<script src="../../js/jquery.js" type="text/javascript"
|
|
14
|
+
charset="utf-8"></script>
|
|
15
|
+
<script src="../../js/thickbox-compressed.js" type="text/javascript"
|
|
16
|
+
charset="utf-8"></script>
|
|
17
|
+
<script src="../../js/quicksearch.js" type="text/javascript"
|
|
18
|
+
charset="utf-8"></script>
|
|
19
|
+
<script src="../../js/darkfish.js" type="text/javascript"
|
|
20
|
+
charset="utf-8"></script>
|
|
21
|
+
</head>
|
|
22
|
+
|
|
23
|
+
<body class="file file-popup">
|
|
24
|
+
<div id="metadata">
|
|
25
|
+
<dl>
|
|
26
|
+
<dt class="modified-date">Last Modified</dt>
|
|
27
|
+
<dd class="modified-date">Fri Sep 25 12:58:54 -0700 2009</dd>
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
<dt class="requires">Requires</dt>
|
|
31
|
+
<dd class="requires">
|
|
32
|
+
<ul>
|
|
33
|
+
|
|
34
|
+
<li>log4r/formatter/formatter</li>
|
|
35
|
+
|
|
36
|
+
<li>log4r/outputter/outputter</li>
|
|
37
|
+
|
|
38
|
+
<li>log4r/configurator</li>
|
|
39
|
+
|
|
40
|
+
<li>syslog</li>
|
|
41
|
+
|
|
42
|
+
</ul>
|
|
43
|
+
</dd>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
</dl>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div id="documentation">
|
|
51
|
+
|
|
52
|
+
<div class="description">
|
|
53
|
+
<h2>Description</h2>
|
|
54
|
+
<h1>SyslogOutputter</h1>
|
|
55
|
+
<p>
|
|
56
|
+
A SyslogOutputter transforms a <a
|
|
57
|
+
href="../../Log4r/LogEvent.html">Log4r::LogEvent</a> into a call to
|
|
58
|
+
syslog(). Since syslog has its own formatting system, log4r formatters are
|
|
59
|
+
ignored.
|
|
60
|
+
</p>
|
|
61
|
+
<h2>Usage</h2>
|
|
62
|
+
<p>
|
|
63
|
+
To use,
|
|
64
|
+
</p>
|
|
65
|
+
<pre>
|
|
66
|
+
<tt>require 'log4r/outputter/syslogoutputter'</tt>
|
|
67
|
+
</pre>
|
|
68
|
+
<p>
|
|
69
|
+
An example,
|
|
70
|
+
</p>
|
|
71
|
+
<pre>
|
|
72
|
+
require 'log4r'
|
|
73
|
+
require 'log4r/outputter/syslogoutputter'
|
|
74
|
+
|
|
75
|
+
syslog = Log4r::SyslogOutputter.new("name", 'logopt'=>#, 'facility'=>#)
|
|
76
|
+
syslog.err("this is an ERR message")
|
|
77
|
+
</pre>
|
|
78
|
+
<p>
|
|
79
|
+
The output in <tt>/var/logs/syslog</tt> (Debian) is,
|
|
80
|
+
</p>
|
|
81
|
+
<pre>
|
|
82
|
+
Sep 3 11:43:06 tiphares sys[1603]: this is an ERR message
|
|
83
|
+
</pre>
|
|
84
|
+
<p>
|
|
85
|
+
The hash arguments <tt>logoptions</tt> and <tt>facility</tt> are passed to
|
|
86
|
+
<tt>Syslog.open</tt>. The defaults are <tt>LOG_PID | LOG_CONS</tt> and
|
|
87
|
+
<tt>LOG_USER</tt> respectively.
|
|
88
|
+
</p>
|
|
89
|
+
<p>
|
|
90
|
+
This is a first try implementation. It works well. Please report any bugs
|
|
91
|
+
and fixes.
|
|
92
|
+
</p>
|
|
93
|
+
<table>
|
|
94
|
+
<tr><td valign="top">Version:</td><td>$Id: syslogoutputter.rb,v 1.4 2009/09/24 23:11:16 colbygk Exp $
|
|
95
|
+
|
|
96
|
+
</td></tr>
|
|
97
|
+
<tr><td valign="top">Author:</td><td>Steve Lumos
|
|
98
|
+
|
|
99
|
+
</td></tr>
|
|
100
|
+
<tr><td valign="top">Author:</td><td>Leon Torres
|
|
101
|
+
|
|
102
|
+
</td></tr>
|
|
103
|
+
</table>
|
|
104
|
+
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
</div>
|
|
108
|
+
</body>
|
|
109
|
+
</html>
|
|
110
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
4
|
+
|
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
6
|
+
<head>
|
|
7
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
8
|
+
|
|
9
|
+
<title>File: tst.rb [1.1.2 Log4r API Documentation]</title>
|
|
10
|
+
|
|
11
|
+
<link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet" />
|
|
12
|
+
|
|
13
|
+
<script src="../../js/jquery.js" type="text/javascript"
|
|
14
|
+
charset="utf-8"></script>
|
|
15
|
+
<script src="../../js/thickbox-compressed.js" type="text/javascript"
|
|
16
|
+
charset="utf-8"></script>
|
|
17
|
+
<script src="../../js/quicksearch.js" type="text/javascript"
|
|
18
|
+
charset="utf-8"></script>
|
|
19
|
+
<script src="../../js/darkfish.js" type="text/javascript"
|
|
20
|
+
charset="utf-8"></script>
|
|
21
|
+
</head>
|
|
22
|
+
|
|
23
|
+
<body class="file file-popup">
|
|
24
|
+
<div id="metadata">
|
|
25
|
+
<dl>
|
|
26
|
+
<dt class="modified-date">Last Modified</dt>
|
|
27
|
+
<dd class="modified-date">Thu Sep 24 14:41:51 -0700 2009</dd>
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
<dt class="requires">Requires</dt>
|
|
31
|
+
<dd class="requires">
|
|
32
|
+
<ul>
|
|
33
|
+
|
|
34
|
+
<li>syslog</li>
|
|
35
|
+
|
|
36
|
+
</ul>
|
|
37
|
+
</dd>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
</dl>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div id="documentation">
|
|
45
|
+
|
|
46
|
+
<div class="description">
|
|
47
|
+
<h2>Description</h2>
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
</body>
|
|
53
|
+
</html>
|
|
54
|
+
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
5
|
+
<head>
|
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
7
|
+
|
|
8
|
+
<title>Class: Log4r::PatternFormatter</title>
|
|
9
|
+
|
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
|
11
|
+
|
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
|
13
|
+
charset="utf-8"></script>
|
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
|
15
|
+
charset="utf-8"></script>
|
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
|
17
|
+
charset="utf-8"></script>
|
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
|
19
|
+
charset="utf-8"></script>
|
|
20
|
+
|
|
21
|
+
</head>
|
|
22
|
+
<body class="class">
|
|
23
|
+
|
|
24
|
+
<div id="metadata">
|
|
25
|
+
<div id="file-metadata">
|
|
26
|
+
<div id="file-list-section" class="section">
|
|
27
|
+
<h3 class="section-header">In Files</h3>
|
|
28
|
+
<div class="section-body">
|
|
29
|
+
<ul>
|
|
30
|
+
|
|
31
|
+
<li><a href="../log4r/formatter/patternformatter_rb.html?TB_iframe=true&height=550&width=785"
|
|
32
|
+
class="thickbox" title="log4r/formatter/patternformatter.rb">log4r/formatter/patternformatter.rb</a></li>
|
|
33
|
+
|
|
34
|
+
</ul>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div id="class-metadata">
|
|
42
|
+
|
|
43
|
+
<!-- Parent Class -->
|
|
44
|
+
|
|
45
|
+
<div id="parent-class-section" class="section">
|
|
46
|
+
<h3 class="section-header">Parent</h3>
|
|
47
|
+
|
|
48
|
+
<p class="link">BasicFormatter</p>
|
|
49
|
+
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
<!-- Namespace Contents -->
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<!-- Method Quickref -->
|
|
57
|
+
|
|
58
|
+
<div id="method-list-section" class="section">
|
|
59
|
+
<h3 class="section-header">Methods</h3>
|
|
60
|
+
<ul class="link-list">
|
|
61
|
+
|
|
62
|
+
<li><a href="#M000033">::new</a></li>
|
|
63
|
+
|
|
64
|
+
<li><a href="#M000034">#thread_name</a></li>
|
|
65
|
+
|
|
66
|
+
</ul>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
<!-- Included Modules -->
|
|
71
|
+
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<div id="project-metadata">
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
<div id="fileindex-section" class="section project-section">
|
|
78
|
+
<h3 class="section-header">Files</h3>
|
|
79
|
+
<ul>
|
|
80
|
+
|
|
81
|
+
<li class="file"><a href="../log4r/rdoc/configurator.html">configurator</a></li>
|
|
82
|
+
|
|
83
|
+
<li class="file"><a href="../log4r/rdoc/emailoutputter.html">emailoutputter</a></li>
|
|
84
|
+
|
|
85
|
+
<li class="file"><a href="../log4r/rdoc/formatter.html">formatter</a></li>
|
|
86
|
+
|
|
87
|
+
<li class="file"><a href="../log4r/rdoc/log4r.html">log4r</a></li>
|
|
88
|
+
|
|
89
|
+
<li class="file"><a href="../log4r/rdoc/logger.html">logger</a></li>
|
|
90
|
+
|
|
91
|
+
<li class="file"><a href="../log4r/rdoc/logserver.html">logserver</a></li>
|
|
92
|
+
|
|
93
|
+
<li class="file"><a href="../log4r/rdoc/outputter.html">outputter</a></li>
|
|
94
|
+
|
|
95
|
+
<li class="file"><a href="../log4r/rdoc/patternformatter.html">patternformatter</a></li>
|
|
96
|
+
|
|
97
|
+
<li class="file"><a href="../log4r/rdoc/syslogoutputter.html">syslogoutputter</a></li>
|
|
98
|
+
|
|
99
|
+
<li class="file"><a href="../log4r/rdoc/yamlconfigurator.html">yamlconfigurator</a></li>
|
|
100
|
+
|
|
101
|
+
</ul>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
<div id="classindex-section" class="section project-section">
|
|
106
|
+
<h3 class="section-header">Class Index
|
|
107
|
+
<span class="search-toggle"><img src="../images/find.png"
|
|
108
|
+
height="16" width="16" alt="[+]"
|
|
109
|
+
title="show/hide quicksearch" /></span></h3>
|
|
110
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
|
111
|
+
<fieldset>
|
|
112
|
+
<legend>Quicksearch</legend>
|
|
113
|
+
<input type="text" name="quicksearch" value=""
|
|
114
|
+
class="quicksearch-field" />
|
|
115
|
+
</fieldset>
|
|
116
|
+
</form>
|
|
117
|
+
|
|
118
|
+
<ul class="link-list">
|
|
119
|
+
|
|
120
|
+
<li><a href="../Log4r.html">Log4r</a></li>
|
|
121
|
+
|
|
122
|
+
<li><a href="../Log4r/BasicFormatter.html">Log4r::BasicFormatter</a></li>
|
|
123
|
+
|
|
124
|
+
<li><a href="../Log4r/ConfigError.html">Log4r::ConfigError</a></li>
|
|
125
|
+
|
|
126
|
+
<li><a href="../Log4r/Configurator.html">Log4r::Configurator</a></li>
|
|
127
|
+
|
|
128
|
+
<li><a href="../Log4r/DateFileOutputter.html">Log4r::DateFileOutputter</a></li>
|
|
129
|
+
|
|
130
|
+
<li><a href="../Log4r/DefaultFormatter.html">Log4r::DefaultFormatter</a></li>
|
|
131
|
+
|
|
132
|
+
<li><a href="../Log4r/EmailOutputter.html">Log4r::EmailOutputter</a></li>
|
|
133
|
+
|
|
134
|
+
<li><a href="../Log4r/FileOutputter.html">Log4r::FileOutputter</a></li>
|
|
135
|
+
|
|
136
|
+
<li><a href="../Log4r/Formatter.html">Log4r::Formatter</a></li>
|
|
137
|
+
|
|
138
|
+
<li><a href="../Log4r/IOOutputter.html">Log4r::IOOutputter</a></li>
|
|
139
|
+
|
|
140
|
+
<li><a href="../Log4r/Log4rTools.html">Log4r::Log4rTools</a></li>
|
|
141
|
+
|
|
142
|
+
<li><a href="../Log4r/LogEvent.html">Log4r::LogEvent</a></li>
|
|
143
|
+
|
|
144
|
+
<li><a href="../Log4r/LogServer.html">Log4r::LogServer</a></li>
|
|
145
|
+
|
|
146
|
+
<li><a href="../Log4r/Logger.html">Log4r::Logger</a></li>
|
|
147
|
+
|
|
148
|
+
<li><a href="../Log4r/ObjectFormatter.html">Log4r::ObjectFormatter</a></li>
|
|
149
|
+
|
|
150
|
+
<li><a href="../Log4r/Outputter.html">Log4r::Outputter</a></li>
|
|
151
|
+
|
|
152
|
+
<li><a href="../Log4r/PatternFormatter.html">Log4r::PatternFormatter</a></li>
|
|
153
|
+
|
|
154
|
+
<li><a href="../Log4r/RemoteOutputter.html">Log4r::RemoteOutputter</a></li>
|
|
155
|
+
|
|
156
|
+
<li><a href="../Log4r/RollingFileOutputter.html">Log4r::RollingFileOutputter</a></li>
|
|
157
|
+
|
|
158
|
+
<li><a href="../Log4r/RootLogger.html">Log4r::RootLogger</a></li>
|
|
159
|
+
|
|
160
|
+
<li><a href="../Log4r/SimpleFormatter.html">Log4r::SimpleFormatter</a></li>
|
|
161
|
+
|
|
162
|
+
<li><a href="../Log4r/StderrOutputter.html">Log4r::StderrOutputter</a></li>
|
|
163
|
+
|
|
164
|
+
<li><a href="../Log4r/StdoutOutputter.html">Log4r::StdoutOutputter</a></li>
|
|
165
|
+
|
|
166
|
+
<li><a href="../Log4r/SyslogOutputter.html">Log4r::SyslogOutputter</a></li>
|
|
167
|
+
|
|
168
|
+
<li><a href="../Log4r/YamlConfigurator.html">Log4r::YamlConfigurator</a></li>
|
|
169
|
+
|
|
170
|
+
</ul>
|
|
171
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
<div id="documentation">
|
|
179
|
+
<h1 class="class">Log4r::PatternFormatter</h1>
|
|
180
|
+
|
|
181
|
+
<div id="description">
|
|
182
|
+
<p>
|
|
183
|
+
See <a
|
|
184
|
+
href="../log4r/formatter/patternformatter_rb.html">log4r/formatter/patternformatter.rb</a>
|
|
185
|
+
</p>
|
|
186
|
+
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
<!-- Constants -->
|
|
190
|
+
|
|
191
|
+
<div id="constants-list" class="section">
|
|
192
|
+
<h3 class="section-header">Constants</h3>
|
|
193
|
+
<dl>
|
|
194
|
+
|
|
195
|
+
<dt><a name="DirectiveTable">DirectiveTable</a></dt>
|
|
196
|
+
|
|
197
|
+
<dd class="description"><p>
|
|
198
|
+
Arguments to sprintf keyed to directive letters %c - event short name %C -
|
|
199
|
+
event fullname %d - date %t - trace %m - message %h - thread name %p -
|
|
200
|
+
process ID aka PID %M - formatted message %l - Level in string form %% -
|
|
201
|
+
Insert a %
|
|
202
|
+
</p></dd>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
<dt><a name="DirectiveRegexp">DirectiveRegexp</a></dt>
|
|
206
|
+
|
|
207
|
+
<dd class="description"><p>
|
|
208
|
+
Matches the first directive encountered and the stuff around it.
|
|
209
|
+
</p>
|
|
210
|
+
<ul>
|
|
211
|
+
<li>$1 is the stuff before directive or “” if not applicable
|
|
212
|
+
|
|
213
|
+
</li>
|
|
214
|
+
<li>$2 is the directive group or nil if there’s none
|
|
215
|
+
|
|
216
|
+
</li>
|
|
217
|
+
<li>$3 is the %#.# match within directive group
|
|
218
|
+
|
|
219
|
+
</li>
|
|
220
|
+
<li>$4 is the .# match which we don’t use (it’s there to match
|
|
221
|
+
properly)
|
|
222
|
+
|
|
223
|
+
</li>
|
|
224
|
+
<li>$5 is the directive letter
|
|
225
|
+
|
|
226
|
+
</li>
|
|
227
|
+
<li>$6 is the stuff after the directive or “” if not applicable
|
|
228
|
+
|
|
229
|
+
</li>
|
|
230
|
+
</ul></dd>
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
<dt><a name="ISO8601">ISO8601</a></dt>
|
|
234
|
+
|
|
235
|
+
<dd class="description"><p>
|
|
236
|
+
default date format
|
|
237
|
+
</p></dd>
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
</dl>
|
|
241
|
+
</div>
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
<!-- Attributes -->
|
|
245
|
+
|
|
246
|
+
<div id="attribute-method-details" class="method-section section">
|
|
247
|
+
<h3 class="section-header">Attributes</h3>
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
<div id="pattern-attribute-method" class="method-detail">
|
|
251
|
+
<a name="pattern"></a>
|
|
252
|
+
|
|
253
|
+
<div class="method-heading attribute-method-heading">
|
|
254
|
+
<span class="method-name">pattern</span><span
|
|
255
|
+
class="attribute-access-type">[R]</span>
|
|
256
|
+
</div>
|
|
257
|
+
|
|
258
|
+
<div class="method-description">
|
|
259
|
+
|
|
260
|
+
<p class="missing-docs">(Not documented)</p>
|
|
261
|
+
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
|
|
265
|
+
<div id="date-pattern-attribute-method" class="method-detail">
|
|
266
|
+
<a name="date_pattern"></a>
|
|
267
|
+
|
|
268
|
+
<div class="method-heading attribute-method-heading">
|
|
269
|
+
<span class="method-name">date_pattern</span><span
|
|
270
|
+
class="attribute-access-type">[R]</span>
|
|
271
|
+
</div>
|
|
272
|
+
|
|
273
|
+
<div class="method-description">
|
|
274
|
+
|
|
275
|
+
<p class="missing-docs">(Not documented)</p>
|
|
276
|
+
|
|
277
|
+
</div>
|
|
278
|
+
</div>
|
|
279
|
+
|
|
280
|
+
<div id="date-method-attribute-method" class="method-detail">
|
|
281
|
+
<a name="date_method"></a>
|
|
282
|
+
|
|
283
|
+
<div class="method-heading attribute-method-heading">
|
|
284
|
+
<span class="method-name">date_method</span><span
|
|
285
|
+
class="attribute-access-type">[R]</span>
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
<div class="method-description">
|
|
289
|
+
|
|
290
|
+
<p class="missing-docs">(Not documented)</p>
|
|
291
|
+
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
|
|
295
|
+
</div>
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
<!-- Methods -->
|
|
299
|
+
|
|
300
|
+
<div id="public-class-method-details" class="method-section section">
|
|
301
|
+
<h3 class="section-header">Public Class Methods</h3>
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
<div id="new-method" class="method-detail ">
|
|
305
|
+
<a name="M000033"></a>
|
|
306
|
+
|
|
307
|
+
<div class="method-heading">
|
|
308
|
+
|
|
309
|
+
<span class="method-name">new</span><span
|
|
310
|
+
class="method-args">(hash={})</span>
|
|
311
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
312
|
+
|
|
313
|
+
</div>
|
|
314
|
+
|
|
315
|
+
<div class="method-description">
|
|
316
|
+
|
|
317
|
+
<p>
|
|
318
|
+
Accepts the following hash arguments (either a string or a symbol):
|
|
319
|
+
</p>
|
|
320
|
+
<dl>
|
|
321
|
+
<dt><tt>pattern</tt></dt><dd>A pattern format string.
|
|
322
|
+
|
|
323
|
+
</dd>
|
|
324
|
+
<dt><tt><a href="PatternFormatter.html#date_pattern">date_pattern</a></tt></dt><dd>A Time#strftime format string. See the Ruby Time class for details.
|
|
325
|
+
|
|
326
|
+
</dd>
|
|
327
|
+
<dt><tt><a href="PatternFormatter.html#date_method">date_method</a></tt></dt><dd>As an option to <a
|
|
328
|
+
href="PatternFormatter.html#date_pattern">date_pattern</a>, specify which
|
|
329
|
+
Time.now method to call. For example, <tt>usec</tt> or <tt>to_s</tt>.
|
|
330
|
+
Specify it as a String or Symbol.
|
|
331
|
+
|
|
332
|
+
</dd>
|
|
333
|
+
</dl>
|
|
334
|
+
<p>
|
|
335
|
+
The default date format is <a
|
|
336
|
+
href="PatternFormatter.html#ISO8601">ISO8601</a>, which looks like this:
|
|
337
|
+
</p>
|
|
338
|
+
<pre>
|
|
339
|
+
yyyy-mm-dd hh:mm:ss => 2001-01-12 13:15:50
|
|
340
|
+
</pre>
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
<div class="method-source-code"
|
|
345
|
+
id="new-source">
|
|
346
|
+
<pre>
|
|
347
|
+
<span class="ruby-comment cmt"># File log4r/formatter/patternformatter.rb, line 68</span>
|
|
348
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">hash</span>={})
|
|
349
|
+
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">hash</span>)
|
|
350
|
+
<span class="ruby-ivar">@pattern</span> = (<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'pattern'</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:pattern</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-keyword kw">nil</span>)
|
|
351
|
+
<span class="ruby-ivar">@date_pattern</span> = (<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'date_pattern'</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:date_pattern</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-keyword kw">nil</span>)
|
|
352
|
+
<span class="ruby-ivar">@date_method</span> = (<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'date_method'</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:date_method</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-keyword kw">nil</span>)
|
|
353
|
+
<span class="ruby-ivar">@date_pattern</span> = <span class="ruby-constant">ISO8601</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@date_pattern</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@date_method</span>.<span class="ruby-identifier">nil?</span>
|
|
354
|
+
<span class="ruby-constant">PatternFormatter</span>.<span class="ruby-identifier">create_format_methods</span>(<span class="ruby-keyword kw">self</span>)
|
|
355
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
356
|
+
</div>
|
|
357
|
+
|
|
358
|
+
</div>
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
</div>
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
</div>
|
|
365
|
+
|
|
366
|
+
<div id="public-instance-method-details" class="method-section section">
|
|
367
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
<div id="thread-name-method" class="method-detail ">
|
|
371
|
+
<a name="M000034"></a>
|
|
372
|
+
|
|
373
|
+
<div class="method-heading">
|
|
374
|
+
|
|
375
|
+
<span class="method-name">thread_name</span><span
|
|
376
|
+
class="method-args">()</span>
|
|
377
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
378
|
+
|
|
379
|
+
</div>
|
|
380
|
+
|
|
381
|
+
<div class="method-description">
|
|
382
|
+
|
|
383
|
+
<p class="missing-docs">(Not documented)</p>
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
<div class="method-source-code"
|
|
388
|
+
id="thread-name-source">
|
|
389
|
+
<pre>
|
|
390
|
+
<span class="ruby-comment cmt"># File log4r/formatter/patternformatter.rb, line 77</span>
|
|
391
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">thread_name</span>
|
|
392
|
+
<span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:name</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>.<span class="ruby-identifier">to_s</span>
|
|
393
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
394
|
+
</div>
|
|
395
|
+
|
|
396
|
+
</div>
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
</div>
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
</div>
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
</div>
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
|
409
|
+
|
|
410
|
+
<p>Disabled; run with --debug to generate this.</p>
|
|
411
|
+
|
|
412
|
+
</div>
|
|
413
|
+
|
|
414
|
+
<div id="validator-badges">
|
|
415
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
416
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
417
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
|
418
|
+
</div>
|
|
419
|
+
|
|
420
|
+
</body>
|
|
421
|
+
</html>
|
|
422
|
+
|