log4r 1.0.6 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/INSTALL +18 -0
- data/LICENSE +90 -0
- data/LICENSE.LGPLv3 +165 -0
- data/README +91 -0
- data/Rakefile +70 -0
- data/TODO +35 -0
- data/bin/CVS/Entries +7 -0
- data/bin/CVS/Repository +1 -0
- data/bin/CVS/Root +1 -0
- data/bin/README +8 -0
- data/bin/devconfig.rb +22 -0
- data/bin/makedist.rb +94 -0
- data/bin/makehtml.rb +71 -0
- data/bin/makerdoc.rb +30 -0
- data/bin/prune.rb +37 -0
- data/doc/CVS/Entries +5 -0
- data/doc/CVS/Repository +1 -0
- data/doc/CVS/Root +1 -0
- data/doc/content/CVS/Entries +6 -0
- data/doc/content/CVS/Repository +1 -0
- data/doc/content/CVS/Root +1 -0
- data/doc/dev/CVS/Entries +4 -0
- data/doc/dev/CVS/Repository +1 -0
- data/doc/dev/CVS/Root +1 -0
- data/doc/images/CVS/Entries +3 -0
- data/doc/images/CVS/Repository +1 -0
- data/doc/images/CVS/Root +1 -0
- data/doc/templates/CVS/Entries +2 -0
- data/doc/templates/CVS/Repository +1 -0
- data/doc/templates/CVS/Root +1 -0
- data/examples/CVS/Entries +17 -0
- data/examples/CVS/Repository +1 -0
- data/examples/CVS/Root +1 -0
- data/examples/syslogcustom.rb +47 -0
- data/src/CVS/Entries +2 -0
- data/src/CVS/Repository +1 -0
- data/src/CVS/Root +1 -0
- data/src/log4r.rb +2 -2
- data/src/log4r/CVS/Entries +14 -0
- data/src/log4r/CVS/Repository +1 -0
- data/src/log4r/CVS/Root +1 -0
- data/src/log4r/formatter/CVS/Entries +3 -0
- data/src/log4r/formatter/CVS/Repository +1 -0
- data/src/log4r/formatter/CVS/Root +1 -0
- data/src/log4r/lib/CVS/Entries +3 -0
- data/src/log4r/lib/CVS/Repository +1 -0
- data/src/log4r/lib/CVS/Root +1 -0
- data/src/log4r/outputter/CVS/Entries +12 -0
- data/src/log4r/outputter/CVS/Repository +1 -0
- data/src/log4r/outputter/CVS/Root +1 -0
- data/src/log4r/outputter/syslogoutputter.rb +57 -22
- data/src/log4r/rdoc/CVS/Entries +11 -0
- data/src/log4r/rdoc/CVS/Repository +1 -0
- data/src/log4r/rdoc/CVS/Root +1 -0
- data/src/tst.rb +21 -0
- data/tests/CVS/Entries +11 -0
- data/tests/CVS/Repository +1 -0
- data/tests/CVS/Root +1 -0
- metadata +93 -35
data/INSTALL
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
Log4r Installation Instructions
|
2
|
+
-------------------------------
|
3
|
+
|
4
|
+
Run 'ruby install.rb' or double-click on install.rb
|
5
|
+
|
6
|
+
To reinstall, just do the same thing.
|
7
|
+
|
8
|
+
|
9
|
+
For RubyGems Users
|
10
|
+
------------------
|
11
|
+
|
12
|
+
Log4r is available via the RubyGems online distribution network. To install
|
13
|
+
log4r using this method,
|
14
|
+
|
15
|
+
gem --remote-install log4r
|
16
|
+
|
17
|
+
The log4r.gemspec file is included with the release, allowing one to build the
|
18
|
+
gem file by hand. For more info, see http://rubygems.rubyforge.org/wiki/wiki.pl
|
data/LICENSE
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
|
2
|
+
This software has evolved through three maintainers and three
|
3
|
+
copyright notices. I am an employee of UC Berkeley, which
|
4
|
+
therefore makes me an employee of the State of California.
|
5
|
+
By law, all works that I create as part of my job are
|
6
|
+
owned by the University of California Regents. I am able
|
7
|
+
to mark software as being under the Gnu General Lesser Public
|
8
|
+
License v3 and have done so for my versions of the Log4r software.
|
9
|
+
|
10
|
+
See the file LICENSE.LGPLv3 for more information.
|
11
|
+
|
12
|
+
18 Sept 2009
|
13
|
+
Colby Gutierrez-Kraybill
|
14
|
+
colby@astro.berkeley.edu
|
15
|
+
|
16
|
+
Copyright (c) 2009 University of California Regents, Gnu LGPLv3
|
17
|
+
Copyright (c) 2007, 2008 Revolution Health
|
18
|
+
Copyright (c) 2002-2004 Leon Torres
|
19
|
+
|
20
|
+
---------------------------------------------------------------------
|
21
|
+
Copyright (c) 2007, 2008 Revolution Health
|
22
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
23
|
+
a copy of this software and associated documentation files (the
|
24
|
+
"Software"), to deal in the Software without restriction, including
|
25
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
26
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
27
|
+
permit persons to whom the Software is furnished to do so, subject to
|
28
|
+
the following conditions:
|
29
|
+
|
30
|
+
The above copyright notice and this permission notice shall be
|
31
|
+
included in all copies or substantial portions of the Software.
|
32
|
+
|
33
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
34
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
35
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
36
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
37
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
38
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
39
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
40
|
+
----------------------------------------------------------------------
|
41
|
+
|
42
|
+
--------------------------------------------------------------------------
|
43
|
+
Copyright (c) 2002, 2004 Leon Torres <leon@ugcs.caltech.edu>
|
44
|
+
Log4r is copyrighted free software
|
45
|
+
You can redistribute it and/or modify it under either the terms of the GPL,
|
46
|
+
or the conditions below::
|
47
|
+
|
48
|
+
1. You may make and give away verbatim copies of the source form of the
|
49
|
+
software without restriction, provided that you duplicate all of the
|
50
|
+
original copyright notices and associated disclaimers.
|
51
|
+
|
52
|
+
2. You may modify your copy of the software in any way, provided that
|
53
|
+
you do at least ONE of the following:
|
54
|
+
|
55
|
+
a) place your modifications in the Public Domain or otherwise
|
56
|
+
make them Freely Available, such as by posting said
|
57
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
58
|
+
the author to include your modifications in the software.
|
59
|
+
|
60
|
+
b) use the modified software only within your corporation or
|
61
|
+
organization.
|
62
|
+
|
63
|
+
c) rename any non-standard executables so the names do not conflict
|
64
|
+
with standard executables, which must also be provided.
|
65
|
+
|
66
|
+
d) make other distribution arrangements with the author.
|
67
|
+
|
68
|
+
3. You may distribute the software in object code or executable
|
69
|
+
form, provided that you do at least ONE of the following:
|
70
|
+
|
71
|
+
a) distribute the executables and library files of the software,
|
72
|
+
together with instructions (in the manual page or equivalent)
|
73
|
+
on where to get the original distribution.
|
74
|
+
|
75
|
+
b) accompany the distribution with the machine-readable source of
|
76
|
+
the software.
|
77
|
+
|
78
|
+
c) give non-standard executables non-standard names, with
|
79
|
+
instructions on where to get the original software distribution.
|
80
|
+
|
81
|
+
d) make other distribution arrangements with the author.
|
82
|
+
|
83
|
+
4. You may modify and include the part of the software into any other
|
84
|
+
software (possibly commercial).
|
85
|
+
|
86
|
+
5. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
87
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
88
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
89
|
+
PURPOSE.
|
90
|
+
---------------------------------------------------------------------------
|
data/LICENSE.LGPLv3
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
2
|
+
Version 3, 29 June 2007
|
3
|
+
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
6
|
+
of this license document, but changing it is not allowed.
|
7
|
+
|
8
|
+
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
11
|
+
License, supplemented by the additional permissions listed below.
|
12
|
+
|
13
|
+
0. Additional Definitions.
|
14
|
+
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17
|
+
General Public License.
|
18
|
+
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
20
|
+
other than an Application or a Combined Work as defined below.
|
21
|
+
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
25
|
+
of using an interface provided by the Library.
|
26
|
+
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
28
|
+
Application with the Library. The particular version of the Library
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
30
|
+
Version".
|
31
|
+
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
35
|
+
based on the Application, and not on the Linked Version.
|
36
|
+
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
38
|
+
object code and/or source code for the Application, including any data
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
41
|
+
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
43
|
+
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
46
|
+
|
47
|
+
2. Conveying Modified Versions.
|
48
|
+
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
51
|
+
that uses the facility (other than as an argument passed when the
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
53
|
+
version:
|
54
|
+
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
56
|
+
ensure that, in the event an Application does not supply the
|
57
|
+
function or data, the facility still operates, and performs
|
58
|
+
whatever part of its purpose remains meaningful, or
|
59
|
+
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
61
|
+
this License applicable to that copy.
|
62
|
+
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
64
|
+
|
65
|
+
The object code form of an Application may incorporate material from
|
66
|
+
a header file that is part of the Library. You may convey such object
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
68
|
+
material is not limited to numerical parameters, data structure
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
71
|
+
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
73
|
+
Library is used in it and that the Library and its use are
|
74
|
+
covered by this License.
|
75
|
+
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
77
|
+
document.
|
78
|
+
|
79
|
+
4. Combined Works.
|
80
|
+
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
82
|
+
taken together, effectively do not restrict modification of the
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
85
|
+
the following:
|
86
|
+
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
88
|
+
the Library is used in it and that the Library and its use are
|
89
|
+
covered by this License.
|
90
|
+
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92
|
+
document.
|
93
|
+
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
95
|
+
execution, include the copyright notice for the Library among
|
96
|
+
these notices, as well as a reference directing the user to the
|
97
|
+
copies of the GNU GPL and this license document.
|
98
|
+
|
99
|
+
d) Do one of the following:
|
100
|
+
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
102
|
+
License, and the Corresponding Application Code in a form
|
103
|
+
suitable for, and under terms that permit, the user to
|
104
|
+
recombine or relink the Application with a modified version of
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
107
|
+
Corresponding Source.
|
108
|
+
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
111
|
+
a copy of the Library already present on the user's computer
|
112
|
+
system, and (b) will operate properly with a modified version
|
113
|
+
of the Library that is interface-compatible with the Linked
|
114
|
+
Version.
|
115
|
+
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
117
|
+
be required to provide such information under section 6 of the
|
118
|
+
GNU GPL, and only to the extent that such information is
|
119
|
+
necessary to install and execute a modified version of the
|
120
|
+
Combined Work produced by recombining or relinking the
|
121
|
+
Application with a modified version of the Linked Version. (If
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
126
|
+
for conveying Corresponding Source.)
|
127
|
+
|
128
|
+
5. Combined Libraries.
|
129
|
+
|
130
|
+
You may place library facilities that are a work based on the
|
131
|
+
Library side by side in a single library together with other library
|
132
|
+
facilities that are not Applications and are not covered by this
|
133
|
+
License, and convey such a combined library under terms of your
|
134
|
+
choice, if you do both of the following:
|
135
|
+
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
137
|
+
on the Library, uncombined with any other library facilities,
|
138
|
+
conveyed under the terms of this License.
|
139
|
+
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
141
|
+
is a work based on the Library, and explaining where to find the
|
142
|
+
accompanying uncombined form of the same work.
|
143
|
+
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
145
|
+
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
148
|
+
versions will be similar in spirit to the present version, but may
|
149
|
+
differ in detail to address new problems or concerns.
|
150
|
+
|
151
|
+
Each version is given a distinguishing version number. If the
|
152
|
+
Library as you received it specifies that a certain numbered version
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
154
|
+
applies to it, you have the option of following the terms and
|
155
|
+
conditions either of that published version or of any later version
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
160
|
+
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
164
|
+
permanent authorization for you to choose that version for the
|
165
|
+
Library.
|
data/README
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
Log4r - A flexible logging library for Ruby
|
2
|
+
|
3
|
+
|
4
|
+
This release: 1.1.0 alpha
|
5
|
+
Release date: 2009/xx/xx
|
6
|
+
License: Ruby's
|
7
|
+
Maintainer: Colby Gutierrez-Kraybill
|
8
|
+
Contributors: Leon Torres Original Maintainer
|
9
|
+
Martain Stannard RollingFileOutputter
|
10
|
+
Steve Lumos SyslogOutputter
|
11
|
+
Andreas Hund YamlConfigurator
|
12
|
+
Jamis Buck log4r.gemspec
|
13
|
+
Homepage: http://rubyforge.org/projects/log4r/
|
14
|
+
Download: http://rubyforge.org/frs/?group_id=203
|
15
|
+
|
16
|
+
Summary
|
17
|
+
-------
|
18
|
+
|
19
|
+
Log4r is a comprehensive and flexible logging library written in Ruby for use
|
20
|
+
in Ruby programs. It features a hierarchical logging system of any number of
|
21
|
+
levels, custom level names, logger inheritance, multiple output destinations
|
22
|
+
per log event, execution tracing, custom formatting, thread safteyness, XML
|
23
|
+
and YAML configuration, and more.
|
24
|
+
|
25
|
+
|
26
|
+
Requirements
|
27
|
+
------------
|
28
|
+
|
29
|
+
* (required) Ruby >= 1.7.0 (use log4r 1.0.2 for Ruby 1.6)
|
30
|
+
* (optional) RubyGems for installing Log4r as a gem
|
31
|
+
* (optional) Ruby syslog library for SyslogOutputter
|
32
|
+
* (optional) XML configuration requires REXML
|
33
|
+
* (optional) Remote logging requires ROMP
|
34
|
+
|
35
|
+
|
36
|
+
More Info
|
37
|
+
---------
|
38
|
+
|
39
|
+
* Installation instructions are in the file INSTALL
|
40
|
+
|
41
|
+
* Comprehensive examples are provided in examples/ and can be run right away
|
42
|
+
|
43
|
+
* Log4r homepage: doc/index.html
|
44
|
+
Online: http://log4r.sourceforge.net/
|
45
|
+
|
46
|
+
* Manual: doc/manual.html
|
47
|
+
Online: http://rubyforge.org/docman/?group_id=203
|
48
|
+
|
49
|
+
* RDoc API reference: doc/rdoc/index.html
|
50
|
+
Online: http://rubyforge.org/docman/index.php?group_id=203
|
51
|
+
|
52
|
+
* The changelog
|
53
|
+
|
54
|
+
* Log4r is hosted by RubyForge, which provides news, bug tracking and a forum
|
55
|
+
|
56
|
+
* Feel free to bug the maintainer with any questions (listed at top of file)
|
57
|
+
|
58
|
+
|
59
|
+
Usability
|
60
|
+
---------
|
61
|
+
|
62
|
+
Log4r works really well, so please take advantage of it right away! :)
|
63
|
+
All versions since 0.9.2 have been stable and backward-compatible. The
|
64
|
+
code is stable enough that updates are infrequent and usually only for
|
65
|
+
adding features or keeping the code up to date with Ruby.
|
66
|
+
|
67
|
+
|
68
|
+
Platform Issues
|
69
|
+
---------------
|
70
|
+
|
71
|
+
Log4r is known to work on Linux and WindowsXP. It's safe to assume that Log4r
|
72
|
+
will work on any Ruby-supported platform.
|
73
|
+
|
74
|
+
|
75
|
+
When Trouble Strikes
|
76
|
+
--------------------
|
77
|
+
|
78
|
+
Log4r comes with an internal logger. To see its output, create a logger
|
79
|
+
named 'log4r' before any others and give it a suitable outputter,
|
80
|
+
|
81
|
+
trouble = Logger.new['log4r']
|
82
|
+
trouble.add Outputter.stdout
|
83
|
+
|
84
|
+
Try running the unit tests provided (run the file tests/runtest.rb). Let
|
85
|
+
the maintainer know what's up and feel free to explore and fix the
|
86
|
+
code yourself. It's well documented and written in Ruby. :)
|
87
|
+
|
88
|
+
Also, try out the bug/request tracking system at
|
89
|
+
http://rubyforge.org/tracker/?group_id=203
|
90
|
+
|
91
|
+
Version: $Id: README,v 1.4 2009/09/23 05:14:35 colbygk Exp $
|
data/Rakefile
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
|
2
|
+
# $Id: Rakefile,v 1.2 2009/09/23 05:14:41 colbygk Exp $
|
3
|
+
|
4
|
+
# incorporated from Revolution Health version of log4r
|
5
|
+
|
6
|
+
require 'rubygems'
|
7
|
+
require 'rake/gempackagetask'
|
8
|
+
require 'rubygems/specification'
|
9
|
+
require 'date'
|
10
|
+
require 'fileutils'
|
11
|
+
|
12
|
+
GEM = "log4r"
|
13
|
+
GEM_VERSION = "1.1.0"
|
14
|
+
AUTHOR = "Colby Gutierrez-Kraybill"
|
15
|
+
EMAIL = "colby@astro.berkeley.edu"
|
16
|
+
HOMEPAGE = %q{http://log4r.rubyforge.org}
|
17
|
+
SUMMARY = "Log4r, logging framework for ruby"
|
18
|
+
DESCRIPTION = "See also: http://logging.apache.org/log4j"
|
19
|
+
|
20
|
+
spec = spec = Gem::Specification.new do |s|
|
21
|
+
s.name = GEM
|
22
|
+
s.rubyforge_project = s.name
|
23
|
+
s.version = GEM_VERSION
|
24
|
+
s.platform = Gem::Platform::RUBY
|
25
|
+
s.has_rdoc = false
|
26
|
+
s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
|
27
|
+
s.summary = SUMMARY
|
28
|
+
s.description = DESCRIPTION
|
29
|
+
s.author = AUTHOR
|
30
|
+
s.email = EMAIL
|
31
|
+
s.homepage = HOMEPAGE
|
32
|
+
|
33
|
+
# Uncomment this to add a dependency
|
34
|
+
# s.add_dependency "foo"
|
35
|
+
|
36
|
+
s.require_path = 'src'
|
37
|
+
s.files = %w(LICENSE LICENSE.LGPLv3 README INSTALL Rakefile TODO) + Dir.glob("{src,examples,tests,doc,bin}/**/*")
|
38
|
+
end
|
39
|
+
|
40
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
41
|
+
pkg.gem_spec = spec
|
42
|
+
end
|
43
|
+
|
44
|
+
desc "install the gem locally"
|
45
|
+
task :install => [:package] do
|
46
|
+
sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
|
47
|
+
end
|
48
|
+
|
49
|
+
desc "create a gemspec file"
|
50
|
+
task :make_spec do
|
51
|
+
File.open("#{GEM}.gemspec", "w") do |file|
|
52
|
+
file.puts spec.to_ruby
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
require 'test/unit'
|
57
|
+
|
58
|
+
# TODO: integrate unit tests
|
59
|
+
#task :test do
|
60
|
+
# FileUtils.mkdir(File.join(File.dirname(__FILE__), %w[log])) if !File.exists?(File.join(File.dirname(__FILE__), %w[log]))
|
61
|
+
# FileUtils.rm(Dir.glob(File.join(File.dirname(__FILE__), %w[log *])))
|
62
|
+
# runner = Test::Unit::AutoRunner.new(true)
|
63
|
+
# runner.to_run << 'test'
|
64
|
+
# runner.pattern = [/_test.rb$/]
|
65
|
+
# exit if !runner.run
|
66
|
+
#end
|
67
|
+
|
68
|
+
task :default => [:test, :package] do
|
69
|
+
end
|
70
|
+
|
data/TODO
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
|
2
|
+
Modify syslogoutputter to abstract away from exposing the underlying syslog interface.
|
3
|
+
|
4
|
+
Merge log4r project changes from github, including NDC and GDC
|
5
|
+
From the github project README:
|
6
|
+
=== NDC
|
7
|
+
|
8
|
+
NDCs are per thread, and can be set by:
|
9
|
+
|
10
|
+
Log4r::Logger::NDC.push('something')
|
11
|
+
|
12
|
+
Then in the configuration xml it can be used:
|
13
|
+
|
14
|
+
pattern="%x"
|
15
|
+
|
16
|
+
Which will output the top most diagnostic message on the NDC stack.
|
17
|
+
|
18
|
+
Based on the log4j NDC implementation:
|
19
|
+
http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/NDC.html
|
20
|
+
|
21
|
+
=== GDC
|
22
|
+
|
23
|
+
We also added a Global Diagnostic Context for per application diagnostic messages.
|
24
|
+
|
25
|
+
Log4r::Logger.GDC = "app1"
|
26
|
+
|
27
|
+
Then in the configuration xml it can be used:
|
28
|
+
|
29
|
+
pattern="%g"
|
30
|
+
|
31
|
+
log4_logging.rb uses this to set the message to be the name of the rails application.
|
32
|
+
This can be useful for sorting messages if logs for multiple applications are
|
33
|
+
aggregated at a single point,
|
34
|
+
for example in something like Splunk.
|
35
|
+
|