wiki:Manual/Simulation/Logging

You are here: Manual / Simulation / Logging

TracNav


Logging function and remote server

Click on the below links to get directly to the following sections of this page:

Logging function

Introduction

When activating this function, SEAMCAT will log all intermediate steps and results of the Event Generation Engine (EGE) simulations in an external text file, thus allowing you to review and control all steps in the simulation process.

After creating the desired workspace scenario, the Logging function may be activated through the Simulation Control, where you may select option Run in Debug mode.

You may also wish to review and amend if necessary the settings (format) for the produced log file, as described at the bottom of this page. After this setup, you should launch the simulations in a usual way and upon completion of the specified number of events, SEAMCAT will issue a message informing you that the log file had been saved with a certain name (workspace name plus time stamp) in a given directory (by default within the logfiles directory of the main SEAMCAT folder).

You may then review the generated log file using the standard reading tools, such as Notepad, MS Windows, etc. An example fragment of such log file is shown below:

It may be seen from the presented fragment of a log file that such file gives a summary of all intermediate results and interpretation of input parameters, including what random values were generated for parameters defined as functions or distributions. This information is very useful for you to double check the simulation process. As previously mentioned, you may want to ammend the setting for generating the log file. This could be done via general menu option Configuration (also using CTRL+G), which opens the following dialog box:

On the General tab the following options are available for controlling the logging function:

  • Filename: may be used to define the different name for log file (Note: If a file does not exist, it will be created in the specified directory).
  • Log level: DEBUG, INFO, WARN, ERROR, FATAL or OFF.
  • Format string: Conversion pattern to format the logstatements. Select or/and edit the pattern. New patterns are added to the list. Pattern syntax is described below.
  • Default email : allow you to set a default email that will be used when sending remote job.
  • Home directory: allow you to modify the SEAMCAT home directory where workspaces, plugins etc... are stored.
  • Select the application look and feel: allows you to select various display theme of SEAMCAT (Nimbus theme is recommended).

The Log format test string below the parameter fields shows how the selected settings would affects the log statements.

Tip: We recommended selecting the Log Level: DEBUG and Format String:%m%n, which would result in the most deep level of reporting, while producing short messages containing the most essential information (the above displayed fragment of a log file shows an example generated with these settings).

Format Strings

Each conversion specifier starts with a percent sign (%) and is followed by optional format modifiers and a conversion character.

You are free to insert any literal text within the conversion pattern. %-5p : %m%n = space : space Conversion characters: %-5p %: %m%n

  • c : Used to output the category of the logging event. The category conversion specifier can be optionally followed by a precision specifier, that is a decimal constant in brackets %c{2}.
  • d : Used to output the date of the logging event. The date conversion specifier may be followed by a date format specifier enclosed between braces.

%d{HH:mm:ss,SSS} = 15:41:20,117
%d{dd MMM yyyy HH:mm:ss,SSS} = 31 aug 2004 15:41:20,117.
If no date format specifier is given then ISO8601 format is assumed.
%d = 2004-08-31 15:41:20,117
%d{DATE} = 31 aug 2004 15:41:20,117

  • m : Used to output the application supplied message associated with the logging event.
  • n : Outputs the platform dependent line separator character or characters. This conversion character offers practically the same performance as using non-portable line separator strings such as "n", or "rn". Thus, it is the preferred way of specifying a line separator.
  • p : Used to output the priority of the logging event.
  • r : Used to output the number of milliseconds elapsed since the start of the application until the creation of the logging event.
  • t : Used to output the name of the thread that generated the logging event.
  • % : The sequence %% outputs a single percent sign.

Format modifiers: %-5p %d: %m%n -- left pad.truncate

  • %20c : Left pad with spaces if the category name is less than 20 characters long. | text|
  • %-20c : Right pad with spaces if the category name is less than 20 characters long. |text |
  • %.30c : Truncate from the beginning if the category name is longer than 30 characters.
  • %20.30c : Left pad with spaces if the category name is shorter than 20 characters. However, if category name is longer than 30 characters, then truncate from the beginning.
  • %-20.30c : Right pad with spaces if the category name is shorter than 20 characters. However, if category name is longer than 30 characters, then truncate from the beginning.

For a full description of all the possibilities look at  http://logging.apache.org/log4j/docs/api/org/apache/log4j/PatternLayout.html?  http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html?

Setting up a remote calculation server

NOTE: THIS SERVICE HAS BEEN DISCONNECTED WITH SEAMCAT 4 (MAY 2012)

Every copy of SEAMCAT running on a networked PC can function in server mode. To achieve this only few setup steps are required. These are performed using the Configuration dialog window accessible from File menu.

After opening Configuration dialog, click on the Server Settings tab:

This is the list of parameters needed to configure the server:

Name Meaning
Server PortThis is the port on which server will listen for incoming requests. If you are trying to access server through the internet you have to make sure that this port is open in your firewall configuration.
Temp FolderThis is the folder server will use to store temporary files in. Normally you do not need to change this.
Staging FolderThis is the folder server will use to store staging jobs in. Normally you do not need to change this.
Results FolderThis is the folder server will use to store results in. Normally you do not need to change this.
Error FolderThis is the folder server will use to store erronous jobs in. Normally you do not need to change this.
Processing FolderThis is the folder server will use to process active job in. Normally you do not need to change this.
SMTP ServerThis is the name or ip address of an SMTP server to which you have access. This server is used to send emails to clients upon job completion.
SMTP AuthenticationIf the SMTP requires you to log on before sending email you check this.
SMTP UserCredentials for STMP server
SMTP PasswordCredentials for STMP server
From addressThe address from which outgoing emails from server will be send.
SubjectThe subject of outgoing emails.
BodyBody of outgoing email. If you insert the text "%%jobid%%" (without " but including %%) it will be replaced by actual job id by server.

After specifying necessary server parameters and closing the Configuration window, then the user can start the remote server through the Tools menu by selecting Remote Computing / Start Server Mode. The SEAMCAT application will then switch to server mode and the following screen will appear:

This indicates that the server is active and listening for incoming requests. When necessary, the Server Mode can be de-activated at any time by selecting Remote Computing / Stop Server from the Tools menu.

Further information on remote server can be found in another section of this manual.

Attachments