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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>LuaLogging: A simple API to use logging features in Lua</title>
<link rel="stylesheet" href="doc.css" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo">
<img alt="LuaLogging logo" src="images/lualogging-128.png"/>
</div>
<div id="product_name"><big><strong>LuaLogging</strong></big></div>
<div id="product_description">A simple API to use logging features in Lua.</div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaLogging</h1>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="manual.html">Manual</a>
<ul>
<li><a href="manual.html#installation">Installation</a></li>
<li><a href="manual.html#logger">Logger objects</a></li>
<li><a href="manual.html#examples">Examples</a></li>
</ul>
</li>
<li><a href="manual.html#appenders">Appenders</a>
<ul>
<li><a href="console.html">Console</a></li>
<li><a href="file.html">File</a></li>
<li><a href="rolling_file.html">Rolling File</a></li>
<li><a href="sql.html">SQL</a></li>
<li><a href="socket.html">Socket</a></li>
<li><a href="rsyslog.html">Rsyslog</a></li>
<li><a href="email.html">Email</a></li>
<li><strong>Nginx</strong></li>
</ul>
</li>
<li><a href="https://github.com/lunarmodules/lualogging">Project</a></li>
<li><a href="license.html">License</a></li>
</ul>
</div> <!-- id="navigation" -->
<div id="content">
<h2>Nginx/Openresty appender</h2>
<p>This appender has no configuration options, and simply forwards whatever is
being logged to the configured Nginx log. LuaLogging log-levels will be converted
to the equivalent Nginx ones, and initial log-level will be set to match the
Nginx system level.</p>
<p>It makes sense to configure this logger and set it as the default logger on
Nginx/OpenResty startup. Any libraries will then be able to just grab the
defaultLogger from <code>logging.defaultLogger()</code> and won't need any
modifications to work with Nginx/OpenResty.</p>
<h2>Examples</h2>
<pre class="example">
require("logging.nginx")
local logging = require("logging")
local logger = logging.nginx()
logging.defaultLogger(logger)
logger:info("logging.nginx test")
logger:debug("debugging...")
logger:error("error!")
</pre>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>
|