28.1 Configuring Logback Logging
/etc/oracle/graph/logback-server.xml
. This configuration file
contains the target location for the logs in
/var/log/oracle/graph/
. Additionally, the rolling file appenders
are also defined in this configuration file.
Note:
- Logback is configured to roll the log files based on both log size (250 MB) and date.
- Log files are automatically saved in a compressed format in subdirectories, one directory per month. There can be multiple files on a given day.
- Also, each startup of the graph server(PGX) triggers a new log file.
The Logback configuration file is picked up automatically by the the
graph server(PGX). To use this configuration in your java application, you can set
the logback.configurationFile
system variable when launching the
JVM:
java -Dlogback.configurationFile=$PGX_HOME/conf/logback.xml ...
Changing Logging Level During a JShell Session
When connected to the graph server using JShell, you can use the
loglevel(String loggerName, String levelName)
function to
quickly change the logging level of any logger. For example:
loglevel("oracle.pgx", "debug")
loglevel("ROOT", "info")
loglevel("org.apache.hadoop", "off")
Logging in a Web Application Server
The graph-server-webapp-<version>.war
file in the
oracle-graph-webapps-<version>.zip
download package
contains the logback.xml
. This file determines what should be
logged in the web application running on the application server of your choice. The
file is located in the folder WEB-INF/classes
inside the
graph-server-webapp-<version>.war
file. By default, only
errors are logged. But you can change this file if you want more logging in your web
server. You must restart the web server after you change the file, for the change to
take effect.
Parent topic: Log Management in the Graph Server (PGX)