Clarify usage of logging set-level command in documentation The command only works for existing loggers. To set the level for all loggers one must change the log4j configuration. Change-Id: I44c04a2fcae8d8c9e812e7de28cf4ccfd3c31b65
diff --git a/src/main/resources/Documentation/config.md b/src/main/resources/Documentation/config.md index c651243..e3aa1b9 100644 --- a/src/main/resources/Documentation/config.md +++ b/src/main/resources/Documentation/config.md
@@ -103,11 +103,17 @@ To make debug logs visible in Gerrit's log file, debug logging must be enabled for the `com.googlesource.gerrit.plugins.hooks` package. This can be -done by editing the `log4j.properties` file (requires a Gerrit restart) or -by setting the log level at runtime with the ssh command: +done by setting the log level at runtime with the ssh command: ``` ssh -p 29418 user@gerrit gerrit logging set-level DEBUG com.googlesource.gerrit.plugins.hooks ``` +Note that setting the log level at runtime only works for loggers that +have already been created. Loggers that get created after the level was +set will still be created with the default level. + +To set the level for all loggers, it is necessary to do it by editing the +`log4j.properties` file. This requires the Gerrit server to be restarted. + [1]: ../../../Documentation/config-gerrit.html#gerrit.canonicalWebUrl