User Tools

Site Tools


generallog4jconfigurationinformation

Logging (Log4J) Configurations

Log4J is used in all ErgoTech products to perform logging operations, whether these be to the console for quick debugging with print() statements in scripts, or log files for comprehensive logging of events and activities, or to other types of loggers. Currently all products use log4j 1.2.xx, which is also known as first generation log4j.

Log4J logging is configured with log4j.xml files. By default log4j will load its configuration from a file called log4j.xml. A different xml file for configuration can be specified using -DLog4JConfiguration=mycustomlog4j.xml, where mycustomlog4j is an alternate logging configuration.

Logging and log4j configuration is similar between products. Please select a specific topic below for detailed discussions and configuration options. For file loggers the log4j configuration is set to roll over the logs after they reach a specified size. So, for example, you may see MIX.log, MIX.log.1, MIX.log.2, etc., where MIX.log is the most recent file.

Logging for the MIX Runtime

By default MIX logs to a MIX.log configured with log4j.mix.xml. The logs are generally generated as MIX.log in a “logs” subdirectory under the main MIX runtime directory.

Logging for MIStudio

MIStudio provides logging during project development. When you use the MIStudio.exe wrapper, a log file is generated in the project directory.

TransSECS (Editor) Logging

While developing and testing projects (in LIVE mode) in TransSECS you can see SECS/GEM messages logged in SECSMessages.log in the TransSECS Builder directory. TransSECS Tester also has a log with the same name in which the SECS/GEM communication is logged.

To log to the regular MIX or TransSECS logs in scripts use DataSource.logMessage(“your text”); Note: to use DataSource either fully qualify it like this: com.ergotech.vib.servers.DataSource.logMessage(“your message”) or add a “type” for DataSource in your script (usually at the top), like this: DataSource = Java.type(“com.ergotech.vib.servers.DataSource”);

TransSECS deployments also use log4j.xml to configure the logging for these runtimes. SECS/GEM messages will be logged in SECSMessages.log.

For more options and configuration of TransSECS project logging, see:

TransSECS Log4J Configuration

Logging in Scripts

Scripts in both MIStudio/MIX and TransSECS can produce extra logging for debugging and events as the script is executed.

Logging in Scripts

generallog4jconfigurationinformation.txt · Last modified: by wikiadmin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki