HPCCommunity.org
 
Register

Go Back   HPC Community - High Performance Computing (HPC) Community > Symphony Developer Edition (DE) > Symphony DE Articles and Helpful Tips > Development and Debugging Tips

Development and Debugging Tips Share development and debugging tips for Symphony DE.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 11th, 2008, 07:13 AM
Ajith's Avatar
Symphony DE Moderator
 
Join Date: February 28th, 2008
Location: Markham, Ontario
Posts: 86
Blog Entries: 2
Default Using Logging in Symphony DE

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.
Code:
agent.log4j.properties
api.log4j.properties
cli.log4j.properties
sd.log4j.properties
sim.log4j.properties
ssm.log4j.properties
2. Open the api.log4j.properties file and modify the following line and save.

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.
Reply With Quote
  #2 (permalink)  
Old August 6th, 2008, 09:18 PM
Junior Member
 
Join Date: July 29th, 2008
Location: Mississauga
Posts: 13
Default Use of log4cxx in service

What is your suggestions about using log4cxx in service? I would like to use in my service for tracing.
Reply With Quote
  #3 (permalink)  
Old August 11th, 2008, 07:06 PM
Ajith's Avatar
Symphony DE Moderator
 
Join Date: February 28th, 2008
Location: Markham, Ontario
Posts: 86
Blog Entries: 2
Default Logging

You are free to use log4cxx, just download the latest version and use it. We use log4cxx inside Symphony, but changed the namespace to avoid interactions with different versions.

We also have a logging sample that implements a simple logging scheme. See the 4.0/samples/CPP/Logging/Service directory in your Symphony installation for an example.

- Ajith
Reply With Quote
  #4 (permalink)  
Old August 12th, 2008, 02:47 PM
Junior Member
 
Join Date: July 29th, 2008
Location: Mississauga
Posts: 13
Default

It means I should no worry about interaction. Thank you for answer.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:28 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.