Debian Codegraph @

docs/index.html

raw ◀ ▶
1 Debian patch touch this file
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>LuaLogging: A simple API to use logging features in Lua</title>
6 <link rel="stylesheet" href="doc.css" type="text/css"/>
7 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
8 </head>
9 <body>
10
11 <div id="container">
12
13 <div id="product">
14 <div id="product_logo">
15 <img alt="LuaLogging logo" src="images/lualogging-128.png"/>
16 </div>
17 <div id="product_name"><big><strong>LuaLogging</strong></big></div>
18 <div id="product_description">A simple API to use logging features in Lua.</div>
19 </div> <!-- id="product" -->
20
21 <div id="main">
22
23 <div id="navigation">
24 <h1>LuaLogging</h1>
25 <ul>
26 <li><strong>Home</strong></li>
27 <li><a href="manual.html">Manual</a>
28 <ul>
29 <li><a href="manual.html#installation">Installation</a></li>
30 <li><a href="manual.html#logger">Logger objects</a></li>
31 <li><a href="manual.html#examples">Examples</a></li>
32 </ul>
33 </li>
34 <li><a href="manual.html#appenders">Appenders</a>
35 <ul>
36 <li><a href="console.html">Console</a></li>
37 <li><a href="file.html">File</a></li>
38 <li><a href="rolling_file.html">Rolling File</a></li>
39 <li><a href="sql.html">SQL</a></li>
40 <li><a href="socket.html">Socket</a></li>
41 <li><a href="rsyslog.html">Rsyslog</a></li>
42 <li><a href="email.html">Email</a></li>
43 <li><a href="nginx.html">Nginx</a></li>
44 </ul>
45 </li>
46 <li><a href="https://github.com/lunarmodules/lualogging">Project</a></li>
47 <li><a href="license.html">License</a></li>
48 </ul>
49 </div> <!-- id="navigation" -->
50
51 <div id="content">
52 <h2><a name="overview"></a>Overview</h2>
53
54 <p>LuaLogging provides a simple API to use logging features in Lua.
55 Its design was based on
56 <a href="https://logging.apache.org/log4j/docs/index.html">log4j</a>.
57 LuaLogging currently supports, through the use of <em><a href="manual.html#appenders">appenders</a></em>,
58 console, file, email, socket and sql outputs.</p>
59
60 <p>
61 LuaLogging is free software and uses the same <a href="license.html">license</a>
62 as Lua 5.1.
63 </p>
64
65 <h2><a name="status"></a>Status</h2>
66
67 <p>
68 Current version is 1.8.2. It was developed for Lua 5.1+.
69 </p>
70
71 <h2><a name="download"></a>Download</h2>
72
73 <p>
74 LuaLogging can be downloaded from its
75 <a href="https://github.com/lunarmodules/lualogging/archives/master">GitHub</a>
76 downloads page or installed via LuaRocks.
77 </p>
78
79 <h2><a name="dependencies"></a>Dependencies</h2>
80
81 <p>LuaLogging dependencies can be separated by the used appenders:</p>
82
83 <dl>
84 <dt><strong>LuaLogging Core, Console and File appenders</strong></dt>
85 <dd>
86 <ul>
87 <li><a href="https://www.lua.org">Lua 5.1+</a></li>
88 </ul>
89 </dd>
90
91 <dt><strong>Socket, Rsyslog, and Email appenders</strong></dt>
92 <dd>
93 <ul>
94 <li><a href="http://w3.impa.br/~diego/software/luasocket/">LuaSocket</a></li>
95 </ul>
96 </dd>
97
98 <dt><strong>SQL appender</strong></dt>
99 <dd>
100 <ul>
101 <li>LuaSQL 2.1.x</li>
102 </ul>
103 </dd>
104 </dl>
105
106 <h2><a name="history"></a>History</h2>
107
108 <dl class="history">
109 <dt><strong>1.8.2</strong> [27/Jan/2023]</dt>
110 <dd><strong>Fix</strong>: allow to work without the debug library.</dd>
111
112 <dt><strong>1.8.1</strong> [23/Jan/2023]</dt>
113 <dd><strong>Fix</strong>: use explicit tostring, don't rely on automatic coercion.</dd>
114 <dd><strong>Fix</strong>: rsyslog appender wouldn't properly clear the socket upon an error.</dd>
115
116 <dt><strong>1.8.0</strong> [22/Oct/2022]</dt>
117 <dd><strong>Added</strong>: new module <code>logging.envconfig</code> to allow log configuration via
118 environment variables.</dd>
119 <dd><strong>Refactor</strong>: refactored the appenders to be more object like. They now return a module table.</dd>
120 <dd><strong>Fix</strong>: add rsyslog appender to makefile install target.</dd>
121 <dd><strong>Fix</strong>: errorhandler in rsyslog was omitting 'self', and also log the failed message itself to stderr.</dd>
122 <dd><strong>Fix</strong>: when using Copas and rsyslog on Lua 5.1, coxpcall is required to yield.</dd>
123 <dd><strong>Fix</strong>: rsyslog; upon failure remove the closed socket from the cache to prevent the retry from using
124 the closed socket.</dd>
125
126 <dt><strong>1.7.0</strong> [21/Sep/2022]</dt>
127 <dd><strong>Added</strong>: new function <code>logging.date</code> is compatible with <code>os.date</code>
128 but supports second-fractions, to be represented by <code>%q</code> placeholder in the
129 <code>timestampPattern</code>.</dd>
130 <dd><strong>Added</strong>: new bundled appender; "rsyslog". This logger will log in syslog format to a remote
131 syslog server. It supports both BSD as well as IETF formats, and supports sending over UDP and TCP, with an option
132 to use Copas for async-sending over TCP.</dd>
133
134 <dt><strong>1.6.0</strong> [09/Nov/2021]</dt>
135 <dd><strong>Added</strong>: the <code>logPattern</code> can now be specified for each log-level individually.
136 This allows use cases like only adding <code>"%source"</code> on debug level, or injecting ansi-color coding
137 in for example the error log-level.</dd>
138 <dd><strong>Added</strong>: new bundled appender; "nginx". This logger has no configuration options, but will
139 simply pass any log messages on to the nginx log. When using LuaLogging in OpenResty, configure this logger.</dd>
140 <dd><strong>Added</strong>: application level defaults. New functions <code>logging.defaultLogPatterns()</code>
141 , <code>logging.defaultTimestampPattern()</code>, <code>logging.defaultLevel()</code>, and <code>logging.defaultLogger()</code>
142 can be used to get/set the global application level defaults.<br/>
143 Use carefully, this is global state, so only applications should set those, libraries should not.</dd>
144 <dd><strong>Added</strong>: the included appenders now have an extra parameter to set
145 log-level upon creation; <code>logLevel</code>.</dd>
146 <dd><strong>Added</strong>: the <code>logPattern</code> can now have new placeholders:<br/>
147 <code>"%file"</code> (source file), <br/>
148 <code>"%line"</code> (source line), <br/>
149 <code>"%function"</code> (function name), and <br/>
150 <code>"%source"</code> (evaluates to <code>"%file:%line in function '%function'"</code>).</dd>
151 <dd><strong>Added</strong>: the console logger has a new optional parameter "destination",
152 which must be either "stderr" or "stdout" (defaults to "stdout")</dd>
153
154 <dt><strong>1.5.2</strong> [12/Aug/2021]</dt>
155 <dd><strong>Fix</strong>: rolling-file, 'seek' can occasionally fail, handle it properly.</dd>
156
157 <dt><strong>1.5.1</strong> [22/Mar/2021]</dt>
158 <dd><strong>Reverted</strong>: Functionality to specify custom log levels.</dd>
159
160 <dt><strong>1.5.0</strong> [22/Mar/2021]</dt>
161 <dd><strong>Added</strong>: Functionality to specify custom log levels.</dd>
162 <dd><strong>Added</strong>: Provide verbose error message when formatting fails.</dd>
163 <dd><strong>Fix</strong>: disable buffering on windows files</dd>
164
165 <dt><strong>1.4.0</strong> [12/Aug/2020]</dt>
166 <dd><strong>Fix</strong>: No more global on Lua 5.3.</dd>
167 <dd><strong>Fix</strong>: Reduced log noise when changing log levels.</dd>
168 <dd><strong>Added</strong>: A new log-level "off" to suspend logging.</dd>
169 <dd><strong>Fix</strong>: Restored the log-level constants on the logger object.</dd>
170 <dd><strong>Fix</strong>: catch exceptions when formatting log messages.</dd>
171 <dd><strong>Change</strong>: creating loggers now always takes a parameters table (consistent
172 across all appenders). The old parameters are now deprecated, but still
173 work for backward compatibility purposes.</dd>
174 <dd><strong>Added</strong>: All appenders have a new property <code>timestampPattern</code>
175 to specify the format of the timestamp in the log message</dd>
176 <dd><strong>Added</strong>: <code>logger:getPrint()</code> function that returns a print-like
177 function, but directs all output to the logger.</dd>
178
179 <dt><strong>1.3.0</strong> [5/Mar/2013]</dt>
180
181 <dt><strong>1.2.0</strong> [20/Apr/2011]</dt>
182 <dd>Improved performance of logging.</dd>
183 <dd>Added Rolling File Appender.</dd>
184
185 <dt><strong>1.1.4</strong> [30/Oct/2007]</dt>
186 <dd>Fixed bug #1719 -
187 inefficient handling of file loggers (Patch by J&uuml;rgen H&ouml;tzel).</dd>
188
189 <dt><strong>1.1.3</strong> [08/Aug/2007]</dt>
190 <dd>New makefile for Windows (using nmake) and configure script for Unix.</dd>
191
192 <dt><strong>1.1.2</strong> [14/Aug/2006]</dt>
193 <dd>Fixed a bug found by Carlos Augusto where tostring() was being
194 incorrectly used with numbers.</dd>
195
196 <dt><strong>1.1.1</strong> [31/Mar/2006]</dt>
197 <dd></dd>
198
199 <dt><strong>1.1.0</strong> [12/Nov/2004]</dt>
200 <dd></dd>
201
202 <dt><strong>1.0.0</strong> [02/Jul/2004]</dt>
203 <dd></dd>
204 </dl>
205
206 <h2><a name="credits"></a>Credits</h2>
207
208 <p>
209 LuaLogging 1.2 and 1.3 were maintained by Robert G. Jakabosky.
210 </p>
211
212 <p>
213 LuaLogging 1.1.x was designed by Danilo Tuler and Thiago Ponte
214 and implemented by Thiago Ponte.
215 </p>
216
217 <p>LuaLogging 1.0.0 was designed by Danilo Tuler (and log4j)
218 and implemented by Danilo Tuler and Andr&eacute; Carregal.</p>
219
220 </div> <!-- id="content" -->
221
222 </div> <!-- id="main" -->
223
224 <div id="about">
225 </div> <!-- id="about" -->
226
227 </div> <!-- id="container" -->
228
229 </body>
230 </html>