Question

Limit/shorten the logging in Command Prompt window when executing FME with command line


Hi there, I'm sorry if I have overlooked the answer to a similar question in this forum. I could not find such a question...

 

When executing the FME workflow from the command line, there is a entry for every 500 features that the reader has processed. With some large data to process, this can amount to many lines in the command prompt window. I cannot scroll up infinitely in this window and it's also not easy to scroll these vast amount of lines if you need to see some other logged output before the FME was started.

 

Is there a way to configure the logging output so that it will not produce this vast amount of lines?

A simple solution could be specifying the logging interval (e.g. increase 500 to 5000) .

As an ideal scenario, the Reader-logging is by default using only one line in the CMD window and is always overwriting itself until the next process in the FME workbench starts when normal logging is to resume with starting on a new line every time.

 

image


14 replies

Userlevel 5
Badge +29

I was wondering if you'd be able to specify the workbench logging level in the CMD call. But looking at the documentation it seems you can't

https://docs.safe.com/fme/2020.0/html/FME_CommandLine/

However there is the option to not log to standard output and instead log to a file. Would that work?

 

 

I was wondering if you'd be able to specify the workbench logging level in the CMD call. But looking at the documentation it seems you can't

https://docs.safe.com/fme/2020.0/html/FME_CommandLine/

However there is the option to not log to standard output and instead log to a file. Would that work?

 

 

Hello and thanks for the reply.

Logging to a file is not really what I'm after. It would require to open every single log file to check for any errors that might have occured during the FME process.

I have a lengthy overall process that runs as a batch script over night with several calls of the FME and in the morning one simply want to check if there is any errors. That's why the logging in the window actually comes quite handy.

 

I hope Safe Software takes up this point as an improvement suggestion to their incredible software. Configuring the logging output in the CMD window would be a big help and improvement!

I was wondering if you'd be able to specify the workbench logging level in the CMD call. But looking at the documentation it seems you can't

https://docs.safe.com/fme/2020.0/html/FME_CommandLine/

However there is the option to not log to standard output and instead log to a file. Would that work?

 

 

As an interim-solution, how can I suppress the logging in the CMD window completely? I checked the "save log to file" option in the FME Options but I still get the output in CMD window. Is there any way to disable this completely somehow?

Userlevel 4

As a workaround, you can increase the vertical screen buffer of the command line window, which will let you scroll back much further: https://superuser.com/a/378323

Userlevel 5
Badge +29

As an interim-solution, how can I suppress the logging in the CMD window completely? I checked the "save log to file" option in the FME Options but I still get the output in CMD window. Is there any way to disable this completely somehow?

In that documentation it says to disable logging use the following:

[LOG_STANDARDOUT <YES|NO>]
   If YES, the session will log to standard output as the translation executes.

 

Thanks for this tip. This is indeed helpful.

I still think that hundreds or even thousand lines of the reader is not really helpful and makes it hard to get an overview of what was going on. I hope Safe Software comes up with something better.

Userlevel 5
Badge +29

Thanks for this tip. This is indeed helpful. 

I still think that hundreds or even thousand lines of the reader is not really helpful and makes it hard to get an overview of what was going on. I hope Safe Software comes up with something better.

Had another look at this. I had originally thought that the Log Message filter only filters in FME Workbench and doesn't effect the workspace (.fmw).

 

However, looking at it, it does change the workspace as well as being a persistant setting in workbench.image 

So, in other words, if you set your required logging level in workbench, save your workspace with that logging, it should then be reflected when you run the workspace via the CLI

 

FMW with all logging enabled:

...
FME_DEBUG MAPPING_FILE BADNEWS UNGROUPED UNCORRELATED DUMP_SCHEMA XSD_VERBOSE HTTP_DEBUG FTP_DEBUG FME_DEBUG STASH
LOG_FILTER_MASK -1
...

FMW with only 'Log Errors'

...
LOG_FILTER_MASK -20
...

 

 

 

Hi there and thanks for looking into this.

I disabled several logging and left on only "Log Errors" in the FME Workbench 2022.1 under

Tools > FME Options > Translation > Log Message Filter

as described. I then added a transformer and deleted it afterwards so that I can save the file again. When I then make the same command line call I still get all the lines from the Reader in the CMD window.

Is there any setting that I missed...?

Userlevel 4

Hi there and thanks for looking into this. 

I disabled several logging and left on only "Log Errors" in the FME Workbench 2022.1 under 

Tools > FME Options > Translation > Log Message Filter 

as described. I then added a transformer and deleted it afterwards so that I can save the file again. When I then make the same command line call I still get all the lines from the Reader in the CMD window. 

Is there any setting that I missed...?

Unless you set LOG_STANDARDOUT=Yes, the command line window output won't include the FME log, which is why limiting the FME log contents won't change anything.

If you want to suppress all the output sent to STDOUT on the command line, try redirecting the output to null, e.g.

fme my_workspace.fmw > null

 

Userlevel 4

Thanks for this tip. This is indeed helpful.

I still think that hundreds or even thousand lines of the reader is not really helpful and makes it hard to get an overview of what was going on. I hope Safe Software comes up with something better.

They did, it's called FME Server ;-)

Please excuse my ignorance but where do I need to place this 

LOG_STANDARDOUT=Yes

exactly? I tried to include it into the command line calling the FME with its input and output parameters but I got an error.

Userlevel 4

Please excuse my ignorance but where do I need to place this 

LOG_STANDARDOUT=Yes

exactly? I tried to include it into the command line calling the FME with its input and output parameters but I got an error.

Excellent question. When I looked into the documentation it seems this option is not generally available, in fact. Should've checked it before I mentioned it!

Excellent question. When I looked into the documentation it seems this option is not generally available, in fact. Should've checked it before I mentioned it!

Aha. Wouldn't this be an excellent feature for Safe Software to implement into their next release...? Would be wonderful!

Userlevel 4

Excellent question. When I looked into the documentation it seems this option is not generally available, in fact. Should've checked it before I mentioned it!

Consider entering your idea here: https://community.safe.com/s/bridea/acideasULT__brIdea__c/00B4Q00000AWlEVUA1

Reply