Join our mailing list Subscribe Us

How to change default log level in OHS 12c?

You change the default log level in OHS 12c either via Fusion Middleware Control (EM) or by editing the OHS configuration (httpd.conf / WLST), depending on whether you use Apache-style logs or ODL logs.


Key concepts
When OraLogMode is Apache, the LogLevel directive controls the error log verbosity (e.g., debug, info, warn, error).


When OraLogMode is ODL-Text (the 12c default), LogLevel is ignored and OraLogSeverity controls the effective log level (default WARNING:32).


Using Fusion Middleware Control (GUI)
Log in to Fusion Middleware Control and navigate:

Target OHS instance → Logs → Log Configuration.


Under Error Log → General, choose the desired Level from the menu (higher level = more verbose, e.g., TRACE vs WARNING).


Click Apply and restart the OHS instance for the new default to take effect.


Editing httpd.conf (Apache mode)
Open the OHS configuration file, typically ${DOMAIN_HOME}/config/fmwconfig/components/OHS/<component_name>/httpd.conf.


Ensure OraLogMode is set to Apache:

OraLogMode Apache.


Set the default log level:

LogLevel warn (default) or, for more detail, e.g. LogLevel debug or LogLevel info.


Restart the OHS instance so the new default log level is used for all future error_log entries.


Changing ODL log level (OraLogSeverity)
If you keep the default ODL logging:

In httpd.conf you will see something like:

OraLogMode ODL-Text

OraLogSeverity WARNING:32.


Change to a more verbose level, for example for tracing:

OraLogSeverity TRACE:32.


Restart OHS; the default diagnostic log level is now TRACE instead of WARNING.


Using WLST to set LogLevel
For centralized configuration (especially in Apache mode):

Run WLST: ${ORACLE_HOME}/oracle_common/common/bin/wlst.sh.


Connect and go to the OHS MBean with editCustom() and cd('oracle.ohs/...').


Set the log level attribute globally or per module, for example:

set('LogLevel','trace7 status:error env:warn').


Save and activate the changes, then restart OHS so the new default applies.


If you share whether your OraLogMode is Apache or ODL-Text and what level you want (e.g., just INFO for prod vs DEBUG/TRACE for troubleshooting), a concrete config snippet can be tailored for your setup.




httpd.conf file content:

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
# The LogLevel directive will take effect only when OraLogMode is set to apache
#
# LogLevel warn
LogLevel debug
#Directives to setup logging via ODL
OraLogDir "${ORACLE_INSTANCE}/servers/${COMPONENT_NAME}/logs"
OraLogMode odl-text
OraLogSeverity TRACE:32
OraLogRotationParams S 10:70

Default

OraLogSeverity WARNING:32