Logger

From fmepedia

Logger is a Workbench Transformer.


Table of contents


Description

Logs each feature to the translation log. All attributes and geometry of the feature will be output.

Limits can be placed on both the number of features that will be logged, and the number of coordinates that will be logged per feature. If the feature has more than the maximum allowed coordinates, then only a set of coordinates at the beginning and end of the feature will be logged. If more features than the maximum to be logged enter the transformer, the features over the limit are not logged.

An alternate way to see the attributes and geometries of features is to route them into a Visualizer transformer, which will display them in the FME Universal Viewer.


NB: The Logger transformer setting for number of features is currently overridden by the LOG_MAX_FEATURES directive. See this question for more details.


To write custom messages to the log use the @Tcl2 function within the TCLCaller transformer.



Example

This workspace shows an example use of the Logger transformer.
There are two versions: FME2006GB onwards and FME2009 onwards

This example is similar to the Terminator Example - the difference being that the Logger workspace merely records the fact of a problem feature, and does not terminate the translation because of it. In this example dates are tested for validity. Invalid dates get a log message - we are assuming it is not necessary to stop the remaining data from being written, which is not always the case.


2009 Updates

The 2009 version has a number of updates not in the original:

  • Workspace Improvements
    • Dummy Data is now Spatial rather than non-geometry
    • Data that fails is no longer dropped, but flagged and proceeds so it can be checked by all tests. The flag status is checked before writing.


  • Functionality Improvements
    • The Logger transformer now writes to an FME_Feature_Store log dataset as well as a plain text log file. This was added in FME2007.
    • The Feature Type in the log dataset is controlled by the Logger transformer with a new setting. This was added in FME2009.


Screenshots


Above: The main workspace. The Loggers are just a small part of this larger scenario.



Above: The Logger parameter to set output Feature Type in the spatial log dataset.



Above: The results of the workspace. Notice the single log FFS file.



Above: When the log data is opened in Viewer, you'll get two different feature types (one per Logger).

Attached Files
filesizedate
Logger Example.jpg98.0 kB11/11/08
Logger Example.zip85.8 kB11/11/08
LoggerExample2009-2.jpg25.3 kB11/11/08
LoggerExample2009-3.jpg18.7 kB11/11/08
LoggerExample2009-4.jpg10.1 kB11/11/08
LoggerExample2009.jpg192.3 kB11/11/08
LoggerExample2009.zip208.0 kB11/11/08
calendar.php------
logger.php------
User Comments Add a new comment