Wrapper Execution Trace Logs
name of the wrapper.
If each execution is logged to a different file (ITPCore.LOGGING_MODE=2),
the name of each log file will be the name of the wrapper + a timestamp
NOTE: The default appender is added to the wrapper log categories with the
“additivity” property set to "false", which means that the log messages are not sent
to the appenders of the ancestor categories (i.e. the wrapper execution trace log
messages are not logged in the Wrapper Server/Wrapper Generation Tool main log
Configuring custom appenders
If the user wants more control over the logging of wrapper execution trace events,
he can define his own custom appender for the trace log categories. He may use a
regular log4j org.apache.log4j.RollingFileAppender, but this suffers from a limitation:
execution trace messages produced by wrappers will all be sent to the same file,
even as the value of the ITPCore.LOGGING_MODE parameter is 1 o 2.
inherits the properties of a FileAppender but adds some extra functionality.
RollingFileWrapperAppender lets the user specify a directory path or a pattern as the
value of the File parameter.
If a directory path is given, it will be used to store the log files, and the name
of the log files themselves will be generated as if using the default appender
(see section 7.3).
If a pattern is given, then "%w" in the pattern will be substituted by the file
name (without extension) which the default appender would use. For example
if File value is "/tmp/Wrapper_%w.txt", ITPCore.LOGGING_MODE=1 and the
wrapper name is "Test", the log file for this wrapper will be
"/tmp/Wrapper_Test.txt". Note that if the pattern does not contain “%w”,
then the file name will be constant and the execution traces produced by
wrappers will all be sent to the same file.
RollingFileWrapperAppender also gives the user precise control over the formatting
of wrapper execution trace events. For this purpose, instead of the regular log4j
"com.denodo.itp.component.core.event.ScriptEventPatternLayout" should be used.
This latter class inherits from PatternLayout and adds the new optional parameter
MessagePattern, which allows to pre-format wrapper trace events before applying
the ConversionPattern layout. The following syntax is used for MessagePattern:
%c represents the component name.
%m represents the message of the trace event.
%t represents the exception associated to event (if any).
%e represents the error code associated to the event (if any).
If no MessagePattern is specified, or if a PatternLayout is used instead of a
ScriptEventPatternLayout, the default format will be "%c - %m". In any case, the
result of applying the MessagePattern will be substituted for occurrences of “%m” in
the ConversionPattern. (Note therefore that occurrences of “%m” in the
ConversionPattern do not mean the original trace message, as they do in the