Logging and Error Handling
Generated Errors in TM are of two main types:
System errors
A system error is generated whenever an error is detected accessing the source or target instances, such as if a database constraint is violated or if an XML node is not located. The source of a system error is therefore not evident by simply reviewing the transformation syntax.
User errors
A user error (or audit trail) is generated whenever any one of the SML transformation statements, NOTEERROR, THROWERROR or FATALERROR is executed. Each type of SML error statement indicates the severity of the error and subsequent action to be taken.
All Errors in Transformation Manager are written to TMError, TM's error model for capturing and dealing with errors.
The screen shot above shows basic error handling, showing the way error information is stored about the individual element that has caused the error. As each error is stored in TM the user may use another transform to write the error out to any format they wish in a similar method to the way they have written the transformation itself.
Logging
TM incorporates Log4J. There are several built-in functions available to send a message direct to a logger, messages logged at specified logging levels, debug, info, warn, error or fatal. Two parameters - message and Log4J logger name - are required to send information to the logger.
E.g. LOGINFO('Trans Acc Info','Logger1');
Logging Configuration
The SetLoggingConfig function allows you to configure the log4J logging using a specified log4J property configuration file.
E.g. SETLOGGINGCONFIG(‘D:\\om\\log4j.properties’);
Logging Existing Output
TM also allows the user to re-direct existing messages generated by TM to a system output file.
