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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
|
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<title>documentation:1.9:logs</title>
<meta name="generator" content="DokuWiki"/>
<meta name="robots" content="index,follow"/>
<meta name="keywords" content="documentation,1.9,logs"/>
<link rel="search" type="application/opensearchdescription+xml" href="lib/exe/opensearch.html" title="LemonLDAP::NG"/>
<link rel="start" href="logs.html"/>
<link rel="contents" href="logs.html" title="Sitemap"/>
<link rel="stylesheet" type="text/css" href="lib/exe/css.php.t.bootstrap3.css"/>
<!-- //if:usedebianlibs
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap.min.css" />
//elsif:useexternallibs
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script>
//elsif:cssminified
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.min.css" />
//else -->
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.css" />
<!-- //endif -->
<script type="text/javascript">/*<![CDATA[*/var NS='documentation:1.9';var JSINFO = {"id":"documentation:1.9:logs","namespace":"documentation:1.9"};
/*!]]>*/</script>
<script type="text/javascript" charset="utf-8" src="lib/exe/js.php.t.bootstrap3.js"></script>
<!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.min.js"></script>
//else -->
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.js"></script>
<!-- //endif -->
<!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery-ui/jquery-ui.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="/lib/scripts/jquery-ui.min.js"></script>
//else -->
<script type="text/javascript" src="/lib/scripts/jquery-ui.js"></script>
<!-- //endif -->
</head>
<body>
<div class="dokuwiki export container">
<!-- TOC START -->
<div id="dw__toc">
<h3 class="toggle">Table of Contents</h3>
<div>
<ul class="toc">
<li class="level1"><div class="li"><a href="#apache_logging">Apache logging</a></div></li>
<li class="level1"><div class="li"><a href="#syslog">Syslog</a></div></li>
<li class="level1"><div class="li"><a href="#override_logging_functions">Override logging functions</a></div></li>
</ul>
</div>
</div>
<!-- TOC END -->
<h1 class="sectionedit1" id="logs">Logs</h1>
<div class="level1">
</div>
<!-- EDIT1 SECTION "Logs" [1-20] -->
<h2 class="sectionedit2" id="apache_logging">Apache logging</h2>
<div class="level2">
<p>
By default, LemonLDAP::NG uses Apache logs to store user actions and other messages:
</p>
<ul>
<li class="level1"><div class="li"> Error log: all messages emitted by the program, depending on the configured log level</div>
</li>
<li class="level1"><div class="li"> Access log: the issuer of each request is identified</div>
</li>
</ul>
<p>
The log level can be set with Apache <code>LogLevel</code> parameter. It can be configured globally, or inside a virtual host.
</p>
<p>
See <a href="http://httpd.apache.org/docs/current/mod/core.html#loglevel" class="urlextern" title="http://httpd.apache.org/docs/current/mod/core.html#loglevel" rel="nofollow">http://httpd.apache.org/docs/current/mod/core.html#loglevel</a> for more information.
</p>
<p>
To configure the user identifier in access log, go in Manager, <code>General Parameters</code> > <code>Logging</code> > <code>REMOTE_USER</code>.
</p>
<p>
You can also hide sensitive values in logs (session content can be displayed in logs in debug loglevel). Go in Manager, <code>General Parameters</code> > <code>Logging</code> > <code>Hidden attributes</code> and set a list of attributes to hide (space separated).
</p>
</div>
<!-- EDIT2 SECTION "Apache logging" [21-850] -->
<h2 class="sectionedit3" id="syslog">Syslog</h2>
<div class="level2">
<p>
LemonLDAP::NG can also use syslog (only for user actions).
</p>
<p>
In Manager, set syslog facility in <code>General Parameters</code> > <code>Logging</code> > <code>Syslog facility</code>.
</p>
<p>
The messages are stored with the levels :
</p>
<ul>
<li class="level1"><div class="li"> <strong>info</strong> for user actions</div>
</li>
<li class="level1"><div class="li"> <strong>notice</strong> for good authentications or external exchange (<abbr title="Security Assertion Markup Language">SAML</abbr>, OpenID,…)</div>
</li>
<li class="level1"><div class="li"> <strong>warn</strong> for failed authentications</div>
</li>
</ul>
</div>
<!-- EDIT3 SECTION "Syslog" [851-1219] -->
<h2 class="sectionedit4" id="override_logging_functions">Override logging functions</h2>
<div class="level2">
<p>
You can customize logs by redefining userNotice() and userError() methods, directly in <code>lemonldap-ng.ini</code>
</p>
<p>
Example:
</p>
<pre class="code file ini"><span class="re0"><span class="br0">[</span>portal<span class="br0">]</span></span>
<span class="re1">userError</span> <span class="sy0">=</span><span class="re2"> sub <span class="br0">{</span> my <span class="br0">(</span>$self, $message<span class="br0">)</span> = @_</span><span class="co0">; ... }</span>
<span class="re1">userNotice</span> <span class="sy0">=</span><span class="re2"> sub <span class="br0">{</span> my <span class="br0">(</span>$self, $message<span class="br0">)</span> = @_</span><span class="co0">; ... }</span></pre>
</div>
<!-- EDIT4 SECTION "Override logging functions" [1220-] --></div>
</body>
</html>
|