SAW Log File Details

Often when we check the saw server log we see a number of files in that location named sawlog0.log tosawlogN.log and sawserver.out.log. These files contain the log of the SAW server or the presentation server.
The sawserver.out.log is the current log file and contains SAW server log. When this is filled a new file is created by the name sawserver.out.log and old file is saved by the name ‘sawlogN.log’.
Now, there arise many questions like, how this new file is created and how many such files will be created and what will be the max size of each file. All these question can be answered by a file named‘logconfig.xml’.
 The ‘logconfig.xml’ file stores information about the directory in which these files will be created, the name of the log files, the max size of the file etc. This file in stored in ‘C:\OracleBIData\web\config‘ location. The file contains a writer section which contain definitions of log writers. eg: A Filelogwriter writes to disk. Some other types of writers are CoutWriter, EventLogWriter, CrashWriter. Below is how the writer section of this logconfig file looks like:
 /*<Writers>
  <Writer implementation=”FileLogWriter” name=”Global File Logger” writerClassId=”1″
    dir=”{%SADATADIR%}/web/log” filePrefix=”sawlog” maxFileSizeKb=”10000″ filesN=”10″ />
  <Writer implementation=”CoutWriter” name=”Global Output  Logger” writerClassId=”2″/>
  <Writer implementation=”EventLogWriter” name=”Event  Logger” writerClassId=”3″ />
<!–
  <Writer implementation=”CrashWriter” name=”Crash Writer 2″ writerClassId=”4″
   file=<file path>
   line=<line number>
   />
–>
</Writers>*/
The attributes need to be specified with the writers to tell the writers where to write the log etc. The attributes for the FileLogWriter are:
Implementation- Supported writer like Coutwriter,FileLogWriter etc
Name- Unique name of the writer
ClassID- Integer number from 1-10
Dir- Path of the Directory where the log will be created.
filePrefix- The saved file will be prefixed with the name given in this attribute.
 maxFileSizeKb- Tells the max size of the log file after which a new log file will be generated.
filesN- Maximum number of log files. After last file is closed, logger starts to write to the beginning of the first one.
The above information can answer many questions like the max size of the log file, the total number of log files created, the location where the log file is created and many more.