daemon: Automatically log into $site_path/logs
We now save daemon log files into $site_path/logs, rolling over once per day using the DailyRollingFileAppender class from log4j. Current messages are written to $site_path/logs/error_log until the end of a day is reached in GMT, and then its renamed to an archive file suffixed with the 'yyyy-mm-dd' format. Because the daemon is meant to run in the background and service user requests, the log messages are automatically redirect to the log file by default. An administrator can force us to send log messages to stderr again by using the new option --console-log. Bug: issue 328 Change-Id: I6add1d2ac8faf57c6ca17964a7e88a2afacfb094 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -11,6 +11,7 @@ SYNOPSIS
|
||||
'java' -DGerritServer=PATH -jar gerrit.war 'daemon'
|
||||
[\--enable-httpd | \--disable-httpd]
|
||||
[\--enable-sshd | \--disable-sshd]
|
||||
[\--console-log]
|
||||
[\--slave]
|
||||
|
||||
DESCRIPTION
|
||||
@@ -47,12 +48,23 @@ OPTIONS
|
||||
+
|
||||
This option automatically implies '\--disable-httpd \--enable-sshd'.
|
||||
|
||||
\--console-log::
|
||||
Send log messages to the console, instead of to the standard
|
||||
log file '$site_path/logs/error_log'.
|
||||
|
||||
CONTEXT
|
||||
-------
|
||||
This command can only be run on a server which has direct
|
||||
connectivity to the metadata database, and local access to the
|
||||
managed Git repositories.
|
||||
|
||||
LOGGING
|
||||
-------
|
||||
Error and warning messages from the server are automatically written
|
||||
to the log file under '$site_path/logs/error_log'. This log file
|
||||
is automatically rotated at 12:00 AM GMT each day, allowing an
|
||||
external log cleaning service to clean up the prior logs.
|
||||
|
||||
KNOWN ISSUES
|
||||
------------
|
||||
Slave daemon caches can quickly become out of date when modifications
|
||||
|
||||
Reference in New Issue
Block a user