Working With Log Files > About Controlling Logging
   
Version 9.1.01
About Controlling Logging
APTARE StorageConsole logs exceptions. Often these exceptions do not indicate a problem with APTARE StorageConsole. However, if you experience system problems, APTARE Global Support Services wants to help you troubleshoot your problem and interpret information in the log files. To speed up troubleshooting, provide the APTARE Global Support Services with the appropriate log files. These log files are often specific to your operating system.
Key log files are managed by a logging subsystem, which manages log file size and rolls and deletes old files. Log files are used only for audit trail or troubleshooting purposes and can be safely deleted.
Turn on Debugging
When you turn on debugging, additional entries are logged to provide troubleshooting details.
1. In the Portal, within a report window, enter the following key combination:
Ctrl+Alt+D
This turns on debugging for the current report and logs messages to both of the following log files:
Linux: /tmp/scon.log and /opt/tomcat/logs/portal.log
Windows: C:\tmp\scon.log and C:\opt\tomcat\logs\portal.log
2. See also Portal Log Files and Reporting Database Log Files.
Reporting Database Logging
The /tmp/scon.log file (on Linux systems) or C:\opt\oracle\logs\scon.log (on Windows systems) contains a database audit trail and troubleshooting messages. You can control database logging by editing the following file, which contains instructions on what to modify in the file.
Linux: /opt/aptare/database/stored_procedures/config.sql
Windows: C:\opt\oracle\database\stored_procedures\config.sql
SCON Logging - Reduce Logging
To minimize output to the scon.log file:
1. Edit the config.sql file.
Linux: /opt/aptare/database/stored_procedures/config.sql
Windows: C:\opt\oracle\database\stored_procedures\config.sql
2. Change the output setting to LOW, as shown in red in the following example.
set Echo Off
set Feedback Off
 
CREATE OR REPLACE PACKAGE config AS
-- Valid APTARE StorageConsole Logging levels are as follows:
-- constant.DEBUG_OFF
-- constant.DEBUG_LOW
-- constant.DEBUG_MEDIUM
-- constant.DEBUG_HIGH
 
-- To change the global APTARE StorageConsole logging level, change the following constant
globalDebugLevel PLS_INTEGER := constant.DEBUG_LOW;
 
reportTransLongerThan FLOAT := 0.85; -- Transactions that take longer than this number of seconds will be reported in aptare-trans.log
-- The following directory will be used to store the APTARE StorageConsole
-- database logfiles scon.log and scon.err. On a Windows portal server,
-- this will default to C:\opt\oracle\logs
LOGDIRECTORY CONSTANT VARCHAR2(64) := '/tmp' ;
END config;
/
SHOW ERRORS;
3. Apply and validate new settings with the following utilities:
Linux:
sqlplus portal/<portal_password>@/opt/aptare/database/stored_procedures/config.sql
sqlplus portal/<portal_password>@/opt/aptare/database/tools/validate_sp
Windows:
sqlplus portal/<portal_password>@C:\opt\oracle\database\stored_procedures\config.sql
sqlplus portal/<portal_password>@C:\opt\oracle\database\tools\validate_sp
Refreshing the SCON Log
Even when the amount of data written to the scon.log file is minimal, over time this file can reach a limit that causes processing to cease. The following instructions provide the steps for a utility that copies the existing log file and then empties scon.log, without impacting StorageConsole processing.
The utility to refresh scon.log executes automatically according to the following rules:
Utility executes monthly to refresh the scon.log file
First run executes 30 days after portal installation
Production run is scheduled for the first Tuesday of every month
The utility searches for the following directory paths until an scon.log file is found:
'C:\opt\oracle\logs','C:\opt\aptare\oracle\logs','C:\opt\aptare\oracle\log','/tmp'
To refresh the scon.log file, use the following utility:
1. Log in to SQLPLUS, as shown below.
Linux & Windows:
sqlplus portal/<portal_password>
2. Execute the log cleanup utility,
Linux & Windows:
exec logfile_cleanup_pkg.cleanupLog(‘Y’,’Y’);
Two parameters are required, as described in the following table:
Backup Flag
Save in Backup File
Description
Y
Y
scon.log file emptied
backup in scon_<month>.log file
Y
N
scon.log file emptied
backup in scon1.log file; all backups will overwrite scon1.log
N
Y
scon.log file emptied
no backup of the scon.log file
N
N
scon.log file emptied
no backup of the scon.log file
NOTE: This utility is intended to be run no more than once a month. If you plan to run it more than once in a month, be aware of the naming convention for the backup scon.log file, as shown with the parameters in the above table.
Application Log Files
To manage the maximum file size and threshold parameter, edit the file:
Linux: /opt/aptare/mbs/systemlogger.xml
Windows: C:\opt\aptare\mbs\systemlogger.xml
<param name="MaxFileSize" value="10MB" />
<param name="MaxBackupIndex" value="10" />
<!--The Threshold param can either be debug/info/warn/error/fatal.-->
<param name="Threshold" value="debug"/>