Add SSH to configure logging level at runtime

Can configure the logging level of loggers with SSH command. This allows
the admin to change the logging level without restarting the server.

Add additional command to print the logging level of loggers.

Change-Id: I3bd3076bf617607430b86d23ca53d48203afcd76
This commit is contained in:
Simon Lei
2014-08-08 11:12:38 -04:00
parent 20984b0500
commit c331a4e92d
6 changed files with 253 additions and 0 deletions

View File

@@ -138,6 +138,12 @@ link:cmd-show-connections.html[gerrit show-connections]::
link:cmd-show-queue.html[gerrit show-queue]::
Display the background work queues, including replication.
link:cmd-logging-ls-level.html[gerrit logging ls-level]::
List loggers and their logging level.
link:cmd-logging-set-level.html[gerrit logging set-level]::
Set the logging level of loggers.
link:cmd-plugin-install.html[gerrit plugin add]::
Alias for 'gerrit plugin install'.

View File

@@ -0,0 +1,43 @@
= gerrit logging ls-level
== NAME
gerrit logging ls-level - view the logging level
gerrit logging ls - view the logging level
== SYNOPSIS
--
'ssh' -p <port> <host> 'gerrit logging ls-level | ls'
<NAME>
--
== DESCRIPTION
View the logging level of specified loggers.
== Options
<NAME>::
Display the loggers which contain the input argument in their name. If this
argument is not provided, all loggers will be printed.
== ACCESS
Caller must have the ADMINISTRATE_SERVER capability.
== Examples
View the logging level of the loggers in the package com.google:
=====
$ssh -p 29418 review.example.com gerrit logging ls-level \
com.google.
=====
View the logging level of every logger
=====
$ssh -p 29418 review.example.com gerrit logging ls-level
=====
GERRIT
------
Part of link:index.html[Gerrit Code Review]
SEARCHBOX
---------

View File

@@ -0,0 +1,51 @@
= gerrit logging set-level
== NAME
gerrit logging set-level - set the logging level
gerrit logging set - set the logging level
== SYNOPSIS
--
'ssh' -p <port> <host> 'gerrit logging set-level | set'
<LEVEL>
<NAME>
--
== DESCRIPTION
Set the logging level of specified loggers.
== Options
<LEVEL>::
Required; logging level for which the loggers should be set.
'reset' can be used to revert all loggers back to their level
at deployment time.
<NAME>::
Set the level of the loggers which contain the input argument in their name.
If this argument is not provided, all loggers will have their level changed.
Note that this argument has no effect if 'reset' is passed in LEVEL.
== ACCESS
Caller must have the ADMINISTRATE_SERVER capability.
== Examples
Change the logging level of the loggers in the package com.google to DEBUG.
=====
$ssh -p 29418 review.example.com gerrit logging set-level \
debug com.google.
=====
Reset the logging level of every logger to what they were at deployment time.
=====
$ssh -p 29418 review.example.com gerrit logging set-level \
reset
=====
GERRIT
------
Part of link:index.html[Gerrit Code Review]
SEARCHBOX
---------