Specialized Administration > Site Maintenance > Managing Windchill Logging
  
Managing Windchill Logging
Windchill log messages contain exception tracebacks and other information that can be used for troubleshooting application behavior.
You manage Windchill Directory Server log files using a command line utility from the server where Windchill Directory Server is installed. For more information, see Managing the Windchill Directory Server Logging.
Starting in Windchill 9.0, Apache log4j is now being used as the primary mechanism for managing and issuing log messages. Some legacy logging has been modified to make use of log4j, but a large amount of previously existing Windchill logging capabilities remain as they were in previous releases and are still managed by Windchill property files configuration settings.
In the 10.0 release, additional legacy Windchill logging capabilities have been migrated to log4j.
To manage logging, you should be familiar with the following:
The property settings that affect logging that are in the wt.properties file. For information about these properties, see the properties.html file that is located in the <Windchill>/codebase directory and see Out-of-the-box wt.properties Log File Settings.
General information about the log4j package.
The following URL takes you to an introduction to log4j:
http://logging.apache.org/log4j/1.2/manual.html
The log4j loggers that are used for Windchill logging.
For descriptions of the out-of-the-box Windchill loggers and additional details on which Java package or class is used as the interface that produces entries in log files, see the following file:
<Windchill>/codebase/loggers.html
You can use the MBeans associated with the loggers for making temporary changes to what is logged. For details on the logger and MBean associations, see the loggers.html file.
The property settings that affect log4j logging. These property settings are in the properties files located in <Windchill>/codebase/WEB-INF:
log4jMethodServer.properties - Controls method server log4j logging and the logging for the Windchill web applications running in the Tomcat servlet engine that is embedded in the method server.
log4jServerManager.properties - Controls server manager log4j logging.
Additionally, the <Windchill>/codebase/log4j.properties file is used as the default configuration file that log4j uses if another configuration file is not specified. The log4j.properties file controls logging options for most applets, PSE, and most command line applications.
Changes to the log4j properties files listed previously must be done by editing the files instead of using the xconfmanager utility. If you make any manual changes to these files, be sure to back up the files as described in Managing Customizations.
How to make temporary changes to log settings using the Logging MBean. See Using MBeans to Work with Log Files.
How to view or send log4j log files.
There are multiple ways to view or send log4j log files. For example:
You can use the LogsDirViewers MBean node to view and email logs.
See Using MBeans to View and Email Log Files.
You can collect log files using the System Configuration Collector that is available from Site > Utilities.
See System Configuration Collector.
You can access the Log File Viewer page to search, list, and view server log files. The link to this page is available from the System Health Monitoring Tools page. Clicking the Monitoring Tools link on the Server Status page opens the page.
For details on the Server Status page and its links, see Server Status.
For details on the Server Status page, access the page from Site > Utilities and then open the online help from the page.
How to use the xconfmanager utility to make permanent changes to the log settings for legacy logging and verbosity properties. For information on using the xconfmanager utility, see Using the xconfmanager Utility.
How to display or set log levels.
There are multiple methods available for setting log levels:
The wt.util.jmx.SetLogLevel command-line utility allows you to set or reset logger verbosity levels for specified loggers in specified server processes. The utility is specified as follows:
java wt.util.jmx.SetLogLevel [-ms|-sm|-se|-all]* [-resetAll]

[<logger_name> [<log_level>]]
where <logger_name> is the name of the logger, and <log_level> is the specified verbosity level. Valid values for log level are: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, and OFF.
The server processes can be specified by any combination of the following:
-sm -- Targets all server managers in the cluster.
-ms -- Targets all method servers in the cluster, including those with and without embedded servlet engines.
-se -- Targets all servlet engines in the cluster.
-all --Targets all of the above processes. If nothing is specified, this is the assumed
The -resetAll option will reset all log4j verbosities in the target processes to the level specified by the log4j configuration file. If both -resetAll and a logger name are specified the reset will be performed prior to setting the specified logger's verbosity level. Either -resetAll or a logger name must be specified.
The Log Levels link on the System Health Monitoring Tools page presents a page from which you can display or set log levels for server manager, method server, or servlet engine loggers for current server processes. You can get to the Log Levels link from Site > Utilities > Server Status. On the Server Status page, click Monitoring Tools.
* 
Certain logging functions should only be enabled for troubleshooting purposes. For more information, see Best Practices for Securing Your Windchill Solution.
The following sections provide additional information on wt.properties log file settings and log event configuration settings.