Document programmatic HTTPD and SSHD logging configuration
Change-Id: Ie342a593a8ae854fe33f312cac22e1089119614a
This commit is contained in:
parent
1b80031d5e
commit
8e4a99051d
@ -1725,6 +1725,9 @@ Enable (or disable) the `'$site_path'/logs/httpd_log` request log.
|
||||
If enabled, an NCSA combined log format request log file is written
|
||||
out by the internal HTTP daemon.
|
||||
+
|
||||
`log4j.appender` with the name `httpd_log` can be configured to overwrite
|
||||
programmatic configuration.
|
||||
+
|
||||
By default, true if httpd.listenUrl uses http:// or https://,
|
||||
and false if httpd.listenUrl uses proxy-http:// or proxy-https://.
|
||||
|
||||
@ -2711,6 +2714,9 @@ By default, `host/canonical.host.name`
|
||||
Enable (or disable) the `'$site_path'/logs/sshd_log` request log.
|
||||
If enabled, a request log file is written out by the SSH daemon.
|
||||
+
|
||||
`log4j.appender` with the name `sshd_log` can be configured to overwrite
|
||||
programmatic configuration.
|
||||
+
|
||||
By default, true.
|
||||
|
||||
[[suggest]] Section suggest
|
||||
|
@ -29,13 +29,6 @@ java_library(
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = 'util',
|
||||
srcs = glob([SRC + 'util/**/*.java']),
|
||||
deps = ['//lib:guava'],
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
||||
java_test(
|
||||
name = 'client_tests',
|
||||
srcs = glob(['src/test/java/**/*.java']),
|
||||
|
@ -88,7 +88,6 @@ java_library2(
|
||||
':init-base',
|
||||
'//gerrit-cache-h2:cache-h2',
|
||||
'//gerrit-common:server',
|
||||
'//gerrit-common:util',
|
||||
'//gerrit-extension-api:api',
|
||||
'//gerrit-gwtexpui:server',
|
||||
'//gerrit-httpd:httpd',
|
||||
|
@ -17,8 +17,8 @@ package com.google.gerrit.pgm.http.jetty;
|
||||
import com.google.gerrit.server.CurrentUser;
|
||||
import com.google.gerrit.server.IdentifiedUser;
|
||||
import com.google.gerrit.server.config.SitePaths;
|
||||
import com.google.gerrit.server.util.LogUtil;
|
||||
import com.google.gerrit.server.util.TimeUtil;
|
||||
import com.google.gerrit.util.LogUtil;
|
||||
|
||||
import org.apache.log4j.Appender;
|
||||
import org.apache.log4j.AsyncAppender;
|
||||
@ -75,6 +75,10 @@ class HttpLog extends AbstractLifeCycle implements RequestLog {
|
||||
Appender appender = log.getAppender(LOG_NAME);
|
||||
if (appender != null) {
|
||||
async.addAppender(appender);
|
||||
} else {
|
||||
log.warn("No appender with the name: "
|
||||
+ LOG_NAME
|
||||
+ " was found. HTTPD logging is disabled");
|
||||
}
|
||||
}
|
||||
async.activateOptions();
|
||||
|
@ -16,7 +16,7 @@ package com.google.gerrit.pgm.util;
|
||||
|
||||
import com.google.gerrit.extensions.events.LifecycleListener;
|
||||
import com.google.gerrit.server.config.SitePaths;
|
||||
import com.google.gerrit.util.LogUtil;
|
||||
import com.google.gerrit.server.util.LogUtil;
|
||||
|
||||
import org.apache.log4j.Appender;
|
||||
import org.apache.log4j.ConsoleAppender;
|
||||
|
@ -17,7 +17,7 @@ package com.google.gerrit.pgm.util;
|
||||
import com.google.gerrit.extensions.events.LifecycleListener;
|
||||
import com.google.gerrit.server.config.SitePaths;
|
||||
import com.google.gerrit.server.git.GarbageCollection;
|
||||
import com.google.gerrit.util.LogUtil;
|
||||
import com.google.gerrit.server.util.LogUtil;
|
||||
|
||||
import org.apache.log4j.Appender;
|
||||
import org.apache.log4j.DailyRollingFileAppender;
|
||||
|
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.util;
|
||||
package com.google.gerrit.server.util;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
@ -7,7 +7,6 @@ java_library2(
|
||||
'//gerrit-extension-api:api',
|
||||
'//gerrit-cache-h2:cache-h2',
|
||||
'//gerrit-common:server',
|
||||
'//gerrit-common:util',
|
||||
'//gerrit-patch-jgit:server',
|
||||
'//gerrit-reviewdb:server',
|
||||
'//gerrit-server:server',
|
||||
|
@ -25,9 +25,9 @@ import com.google.gerrit.server.PeerDaemonUser;
|
||||
import com.google.gerrit.server.config.GerritServerConfig;
|
||||
import com.google.gerrit.server.config.SitePaths;
|
||||
import com.google.gerrit.server.util.IdGenerator;
|
||||
import com.google.gerrit.server.util.LogUtil;
|
||||
import com.google.gerrit.server.util.TimeUtil;
|
||||
import com.google.gerrit.sshd.SshScope.Context;
|
||||
import com.google.gerrit.util.LogUtil;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
@ -89,6 +89,10 @@ class SshLog implements LifecycleListener {
|
||||
Appender appender = log.getAppender(LOG_NAME);
|
||||
if (appender != null) {
|
||||
async.addAppender(appender);
|
||||
} else {
|
||||
log.warn("No appender with the name: "
|
||||
+ LOG_NAME
|
||||
+ " was found. SSHD logging is disabled");
|
||||
}
|
||||
}
|
||||
async.activateOptions();
|
||||
|
Loading…
x
Reference in New Issue
Block a user