Scenario
You want to get an idea of how your workload data moves between the client part of your application and the back-end service part of your application.
Background
Symphony DE uses log4cxx (version 0.9.7) to do logging. If you are familiar with log4j for java, log4cxx is the C++ version. Both log4j and log4cxx are enabled using log4j.properties files.
Symphony DE provides log4j.properties files for the client api library, sd, ssm, sim, agent and command line utilities. These files are located in the /conf directory.
The default log level is INFO. At this level Symphony DE logs error, warning and information messages.
Enable DEBUG logging for the client API
1. List the /conf directory.
2. Open the api.log4j.properties file and modify the following line and save.Code:agent.log4j.properties api.log4j.properties cli.log4j.properties sd.log4j.properties sim.log4j.properties ssm.log4j.properties
log4j.rootLogger=INFO, API
to
log4j.rootLogger=DEBUG, API
3. Run your application. You can use symping. A file called api.{hostname}.log will appear in the current directory.
Enable DEBUG logging for the SD using the log4j file
1. The logging configuration files are local to a specific host. Logging must be enabled on the host that the daemon is running. If you have a multi-host cluster, you need to find which host the daemon (sd, ssm, sim, agent) is running, before enabling logging. Alternateively, you can use soamlog that is described in the next section.
2. Open the sd.log4j.properties file and modify the following line and save.
log4j.rootLogger=INFO, SD
to
log4j.rootLogger=DEBUG, SD
3. Stop and then restart Symphony DE.
4. On the host with the SD, go to the /logs directory.
5. You can view the sd.{hostname}.log file.
Enable DEBUG logging for the SSM using soamlog
1. Soamlog is a Symphony DE utility that can dynamically switch on debugging.
2. To enable DEBUG level logging for the ssm, use the following commands.
Get your application name using soamview app. It must be either pre-started or actively running, otherwise the ssm won't be started.
>soamview app
APPLICATION STATUS SSM HOST SSM PID CONSUMER
symping4.0 enabled ashanmug-2k3* 3640 /SymTesting/Symp*
symexec4.0 disabled - - /SymExec/SymExec*
Set the log level to DEBUG.
>soamlog ssm_all symping4.0 -l LOG_DEBUG
Log level setting command was successfully sent to Session Director.
Set the log level to INFO
>soamlog ssm_all symping4.0 -l LOG_INFO
Log level setting command was successfully sent to Session Director.
3. View the ssm.{hostname}.log file in the /logs directory on the host the ssm is running on.
4. soamlog works for the sd (sd_all), ssm (ssm_all) and sim (sim_all)
Note: The soamlog settings are kept in memory only. If the daemon is stopped and then restarted, the logging setting reverts to its default value. Use the log4j.properties method, if you want the log debug settings to be persisted.


LinkBack URL
About LinkBacks
Reply With Quote