To use Cognos product documentation, you must enable JavaScript in your browser.

Configuring Log Messages 

Log messages are an important diagnostic tool for investigating the behavior of Cognos 8. In addition to error messages, log messages provide information about the status of components and a high-level view of important events. For example, log messages can provide information about attempts to start and stop services, completion of processing requests, and indicators for fatal errors. Audit logs, which are available from a logging database, provide information about user and report activity.

The Cognos 8 services on each computer send information about errors and events to a local log server. A local log server is installed in the c8_location/logs folder on every Cognos 8 computer that contains Content Manager or Application Tier Components. Because the log server uses a different port from the other Cognos 8 components, it continues to process events even if other services on the local computer, such as the dispatcher, are disabled.

The following workflow shows the tasks that are required to prepare for logging.

      During planning, determine the logging configuration that is suitable for your environment. For example, evaluate various log message destinations, such as remote log servers and log files, such as the UNIX or Linux syslog or the Windows NT Event log, in addition to the local log file. You can also send only audit logging information to a third-party database. Consider security, such as methods available for protecting log files from system failures and user tampering. For information about planning, see the Architecture and Deployment Guide.
      During configuration, define the startup properties for logging, such as connection settings for third-party databases. You must also create a logging database if you plan to collect audit logs. If communication between a local log server and a remote log server must be secured, make the appropriate configuration changes on both Cognos 8 computers. For information about configuring logging, see the Installation and Configuration Guide.
      When setting up logging, specify the level of detail to log to focus messages on the information that is relevant in your organization. Audit reports may also be set up to track user and report activity. For information about setting up logging, see the Administration and Security Guide.

For information about using log messages to solve problems and resolving logging-related issues, see the Troubleshooting section of the Administration and Security Guide.

Log Message Destinations

A local log server is automatically installed when you install Content Manager or the Application Tier Components. You can specify one or more destinations where the local log server sends log messages:

For information about log messages, see the Architecture and Deployment Guide.

To configure log messages:

      Create the logging database, if sending messages to a database, using the same procedure as to create the content store database .

Important: For DB2, you must create an additional regular user tablespace with a page size of 8k for Cognos 8 components to create the logging database.

      Set up the database client, if required.
      

Specify the log messages destination.

A Remote Log Server

In a distributed installation, you can configure the log server on each Cognos 8 computer to send log messages to a single remote log server, which acts as a common log server. You can then configure the common log server to send the log messages to a local file or database on the same or another computer.

If the remote log server becomes unavailable, log messages are redirected to recovery files on the local computer in the c8_location\logs\recovery\remote directory. These recovery files have timestamp information in their file names, and are not readable like regular log files. When the remote log server becomes available, an automatic recovery process moves all log information to the remote log server and deletes the local log files.

A File

The log server is configured by default to send log messages to the c8_location/logs/cogserver.log file. If the default log file does not exist when the Cognos 8 service starts, it is created automatically.

You can configure the log server to send log messages to a different file. If you configure a different log file, Cognos 8 attempts to automatically create this file on startup, in addition to the default log file. If the location for the configured log file is different from the c8_location/logs directory, you must ensure the path to the log file exists before starting the Cognos 8 service. For example, if you configure the log server to send messages to the c:/log_files/cognos.log file, Cognos 8 attempts to automatically create the cognos.log file in the c:/log_files folder. If this folder does not exist, Cognos 8 does not create the cognos.log file and no log messages can be recorded in it. Note that these log messages are not recorded in the default log file. Although Cognos 8 automatically creates the default log file even when another log file is configured, the default log file is not used as a backup.

A Database

The log server can also send audit logs to a database on the same or another computer. Audit logs provide information about user and report activity.

The logging database has the same configuration and user account requirements as the content store database. After you configure Cognos 8 components to send messages to a logging database, and restart the Cognos 8 service, Cognos 8 components create the required tables and table fields. You can test the connection to the logging database before you restart the Cognos 8 service.

Set Up the Database Client for a Logging Database 

After you create a database for audit logs, additional steps are required to set up the database client if you use Oracle, DB2, or Sybase as the database server. If you use a Microsoft SQL Server database, the JSQLConnect.jar file is installed to the appropriate location by default. The only additional step is to ensure that the Microsoft SQL Server uses TCP/IP connectivity.

Note: You cannot use Cognos Content Database as a logging database.

If you use an Oracle or Sybase database, you must set up the JDBC driver on all Application Tier Components computers with a connection to the logging database. You must also set up the JDBC driver on the Content Manager computer, unless you are using the same type of database for the log messages as you use for the content store.

If you use a DB2 database, you must set up the database client software and the JDBC 2.0 driver on all Application Tier Components computers with a connection to the logging database. You must also set up the database client software and the JDBC 2.0 driver on the Content Manager computer, unless you are using the same type of database for the log messages as you use for the content store.

Note: In a distributed environment, the local log server on an Application Tier Component computer may send log messages to a remote log server, which then sends messages to the logging database. For Oracle, Sybase, and DB2, the appropriate JDBC driver and database client software (DB2 only) is required only on the Application Tier Components computer with the remote log server that connects to the logging database.

Steps for Oracle
  1. On the computer where Oracle is installed, go to the ORACLE_HOME/jdbc/lib directory.

  2. Copy the ojdbc14.jar file to the c8_location/webapps/p2pd/WEB-INF/lib directory on the appropriate Content Manager or Application Tier Components computers.

    If the directory contains the classes12.jar file, delete it before installing the ojdbc14.jar file.

Steps for DB2
  1. Install the DB2 client software on the appropriate Content Manager or Application Tier Components computers.

  2. If the logging database is on a different computer from the log server, configure a database alias to the logging database:

    Note: If the logging database and log server are on the same computer, the logging database name is automatically used to create an alias.

  3. On Windows, stop the DB2 services and the HTML Search Server.

  4. To copy the JDBC2 driver, copy the DB2_installation/sqllib/java/db2java.zip file to the c8_location/webapps/p2pd/WEB-INF/lib directory.

  5. Rename the db2java.zip file to db2java.jar.

  6. On Windows, restart the DB2 services and the HTML Search Server.

  7. Repeat this entire procedure on the appropriate Content Manager or Application Tier Components computers.

Steps for Sybase
  1. On the computer where Sybase is installed, enable the JDBC driver using the following script:

    Sybase_location/jConnect-5_5/sp/sql_server12.5.sql

  2. Go to the Sybase_location/jConnect-5_5/classes directory.

  3. Copy the jconn2.jar file to the c8_location/webapps/p2pd/WEB-INF/lib directory on the appropriate Content Manager or Application Tier Components computers.

Specify the Log Messages Destination

You can configure a type of destination for the log messages, and then configure properties for the specific destination. You can also configure more than one destination for log messages.

Steps
  1. If the destination is a database, ensure that you

  2. On the computer where you installed Content Manager or the Application Tier Components, start Cognos Configuration.

  3. In the Explorer window, under Environment, click Logging.

  4. In the Properties window, set the log server properties.

  5. In the Explorer window, under Environment, right-click Logging, and click New resource, Destination.

  6. In the Name box, type the name of the destination.

  7. In the Type list, click the type of destination and then click OK.

  8. If the destination is a file, in the Properties window, type the appropriate values for the mandatory and optional properties.

  9. If the destination is a remote log server, in the Properties window, type the appropriate values for the mandatory and optional properties.

    If the Internal dispatcher URI of the destination Cognos 8 computer is configured to use SSL , in the Properties window, set the Enable SSL property to True.

    You must later specify the log messages destination when you configure the remote log server.

  10. If the destination is a database, in the Explorer window, under Logging, specify the type of database and its properties, as follows:

  11. Repeat steps 5 to 10 for each destination to which you want the log server to send messages.

  12. From the File menu, click Save.

  13. In the Explorer window, click Cognos 8 service, Cognos 8.

  14. From the File menu, click Restart.

    If you selected a database as the destination, Cognos 8 components create the required tables and fields in the database that you created.

If the destination was a remote log server, configure and start the remote log server. Then restart the Cognos 8 service on the local computer.

If the destination was a database, you can use Cognos 8 components to run log reports from the database.

You can also set the logging level, which controls the amount of detail and type of messages that are sent to a log file or database. For instructions, see the Administration and Security Guide.