Just for completeness…you can also do this with @Python()   ;)

 

In your mappingfile:

            @Python(fooModule.myLogger,”My log message”)

 

In fooModule.py:

            from pyfme import FMELogFile

            logger = FMELogFile()

            def myLogger(feature,message):

                        logger.log(message)

 

The downside to this approach is that you cannot (currently) embed python in a mapping file.

 

Tom

Safe Software

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Ireland
Sent: August 4, 2006 10:44 AM
To: [email protected]
Subject: [fme] Re: Writing a Message to FME LOG file

 

Hi Michael,
The Logger won't do it, because the @Log() function only writes
feature info with the message.

However - the @Tcl2() function is the one you need - and can be run
from the TCLCaller.

In the TCLCaller set the TCL _expression_ to:

FME_LogMessage fme_inform xxxx

...where xxxx is the message you want logging. Check the @Tcl2()
function in the FME Functions, Factories and Transformers manual for
the different options that are available (eg call it ERROR or WARNING
instead of INFORM).

Good question - I didn't realize you could do this until I checked it out.

Regards,

Mark

Mark Ireland, Senior Product Specialist
Safe Software Inc. Surrey, BC, CANADA
[EMAIL PROTECTED]com http://www.safe.com
Solutions for Spatial Data Translation, Distribution and Access

--- In [EMAIL PROTECTED]com, "mhabarta" <[EMAIL PROTECTED].> wrote:
>
> Hallo
>
> Anybody has an idea, how to write a message to the FME LOG ?
>
> LOGGER writes a feature to the log, but I want to write a text message
> to the LOG.
>
> Thanks Michael
>

__._,_.___

Join us at the FME Worldwide User Conference Sept. 21-22, 2006 Vancouver BC Canada. For more information, visit www.safe.com/2006uc. 




YAHOO! GROUPS LINKS




__,_._,___

Reply via email to