How to disable Oracle listener log.xml

It can become very big and it’s a trouble to your database. Here is how to check listener logging configuration and disable this setting.

$ lsnrctl
LSNRCTL> show log_status
 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
 LISTENER parameter "log_status" set to ON
 The command completed successfully

Here you can see log_status = ON means Oracle keeps logging for listener.

LSNRCTL> show log_file
 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
 LISTENER parameter "log_file" set to /u01/app/oracle/diag/tnslsnr/db84/listener/alert/log.xml
 The command completed successfully

Here you can see the location of the log file with command “show log_file“.

Now disable the Oracle listener logging.

LSNRCTL> set log_status off
 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
 LISTENER parameter "log_status" set to OFF
 The command completed successfully

Now, Oracle will no longer generates listener logging.