Logging Support
jMetra can currently be executed from two contexts - via the command-line or as an Ant task. If the user is executing jMetra from a command-line, the logging will internally utilize log4j. If the user is executing it from within Ant, the logging will utilize the Ant Logging interface.
Logging when using Command-line
When jMetra is executed from the command-line, all logging will default to a log file, jmetra.log, in the executing directory. jMetra leaverages log4j (hyperlink here), and the jmetra.jar contains a default configuration for the management of logging. If a user wishes to customize their logging they may specify a custom log4j.properties file using the -logconfig command-line option. By customizing the logging configuration the user can specify different target directories, different log formats, or different log roll-over rules. Your customizing is only limited by your knowledge of the log4j tool. If you do customize your logging configuration, start with the default configuration that is delivered in the jmetra.jar.
Logging when using Ant
When jMetra is executed as an Ant task, all logging is directed through the standard Ant logging mechanism. The Ant user can then select what logging facility they want to plug in to Ant. Ant provided a default logging facility, but the user can also select from a log4j mechanism, an xml logger, or an email logger. This allows jMetra to log consistently with whatever they rest of your Ant build file is configured to utilize.
Note: Log4j is utilized directly when jMetra is run stand-alone, but if you want to utilize Log4j when jMetra is executing as an Ant task, you must utilize the Ant logging options to specify Log4j explicitly. |