Changes

Jump to navigation Jump to search
1,087 bytes added ,  17:22, 26 October 2017
or compile performance statistics.
The server logs are written in plain text.In your [[Configuration#Database Directory|Database Directory]], you can find a folder named <code>.logs</code> in which all log files are stored with the according date. Note that, depending on your OS and configuration, files and folders beinning with a <code>.</code> may be hidden.==Introduction==
Some changes have been introduced The server logs are written in plain text. In your [[Configuration#Database Directory|Database Directory]], you can find a folder named <code>.logs</code> in which all log files are stored with the according date. Note that, depending on your OS and configuration, files and folders beinning with a <code>.</code> may be hidden. The log directory can be changed via the {{VersionOption|7.5LOGPATH}}:option.
* The Some more notes on the logging format has been revised.facility: * HTTP requests are now included in the log files.
* Logging can be turned on/off via the [[Options#LOG|LOG]] option.
* The maximum length of logging messages can be changed via [[Options#LOGMSGMAXLEN|LOGMSGMAXLEN]].
* An The [[Admin Module]] provides access to the log files from XQuery. ==RESTXQ== Non-trivial web applications provide the ability for users to sign in and out. User handling can be realized with session attributes (see e. g. the [[DBA]] code). By default, RESTXQ code is run with admin permissions. However, as it is more interesting to know which user has called a function, the RESTXQ user string (which is {{Code|admin}} by default, and which will show up in the log data) will be overwritten by the value of an {{Code|id}} session attribute. If the request path includes {{Code|/dba/}}, the {{Code|dba}} session attribute will be assigned. If the following function is called more than once, {{Code|joe}} will appear as user in the second and subsequent log entries: <pre class="brush:xquery">import module namespace Session = 'http://basex.org/modules/session';declare %rest:path('/session-id') function local:f() { Session:set('id', 'joe'), 'I am Joe'};</pre>
==Format==
<pre>
01:18:12.892 SERVER admin OK Server was started.(port: 1984)
01:18:15.436 127.0.0.1:4722 jack REQUEST XQUERY for $i in 1 to 5 return random:double()
01:18:15.446 127.0.0.1:4722 jack OK Query executed in 2.38 ms. 2.72 ms
An admin user has accessed the <code>factbook</code> database via REST.
[[Category=Changelog= ;Version 8.6* Added:Server]]The log directory can be changed with the {{Option|LOGPATH}} option.* Updated: Include session attributes in log data.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu