Controlling Log files in Cognos Data Manager


By default, Cognos Data Manager does a good job logging its workflow.  But there are times you may want to alter or control logging differently from the default logging function.

Location

For instance, you may want to log files somewhere other than the default location (which is the Cognos install directory /datamanager/log).  There are 3 ways to modify log file locations, but all are a variation on the system variable DS_LOG_DIR.  You can control the value of DS_LOG_DIR:

  • In Cognos Configuration
  • By assigning a value in a command line:  SET DS_LOG_DIR=”C:\CustomDirectory\CustomLogDirectory”
  • By assigning a value in a Data Manager job call by adding this to the command line (or adding to “Additional Options” in job execution options):  -VDS_LOG_DIR=c:\CustomDirectory\CustomLogDirectory

Note:  You can also control the default location of data files in the same three ways, using the DS_DATA_DIR system variable.

Whichever method you choose will depend on what you are trying to achieve.  If you always want to write log files to the same directory, you could choose the Congos Configuration option.  If you want different job logs to be written to different locations, you could choose the job call option.  In this way it is flexible.

Naming

Also by default, Cognos Data Manager names its log files in the following convention:  Component Type (Build, DimBuild or Job) + Component Name + Unique Run Number.  This allows for a historic sequence of past runs to be maintained.  If you wanted to change this name to something that is the same on every run, you could choose to use the -L switch on the command line.  This will overwrite your previous run but may allow an external process to read the results of a single-named log file.

Adding -LThisJobLog would write all log files to a file called “ThisJobLog”.  There are a few caveats about this option.  It will ignore any setting for the DS_LOG_DIR, including the default.  You will find your log file written in the Cognos bin directory instead.  If you want to assign a location other than the bin directory, you will need to add it to the -L switch value.  Because of this unexpected behaviour, I do not recommend using the -L switch to rename log files but the option does exist if need be.

Share on LinkedInShare on Twitter+1Share on FacebookAdd to BufferSubmit to StumbleUponShare via email

, ,

  1. No comments yet.
(will not be published)