fmeobjects.FMELogFile.setCallBack

FMELogFile.setCallBack(function)

Provide FME with a callback function that will be called whenever a message is logged. By default, messages will be logged to both the callback function and the Log file. If setFileName is called with None as the filename parameter, then messages will only be sent to the callback.

The callback function must take two arguments: An int severity, and a str message.

Call setCallBack`(:py:obj:`None) to unset a previously-set callback function. This must be called before any previously passed-in callable object falls out of scope.

Parameters:

function (Callable) – The function to provide FME for use as a callback function.

Return type:

None