Expand my Community achievements bar.

Watched folder log

Avatar

Former Community Member

Hi guys, i have a question.

I need to have a log that records the time of which file that was read by the watched folder. Everytime what i put a file, in the watched folder, and the watched folder gets it, the records is set on that log.

How can i do this?

Regards.

Mancini.

4 Replies

Avatar

Level 6

Hi,

There is log component in LC workbench try to put iy as first step in your process. It will store some information to log. Also you can make your aown logging.

BR,

Paul Butenko

Avatar

Level 8

If you are calling one of the "in the box" operations (Generator, Forms, Reader Extensions...) then would have to wrap that in your workflow.  Then add a logging step.  The LC Variable Logger will record the state of the variables, or if you want to create your own log entries you could use a Execute Script operation and use the standard Java System.out.println method to write to the standard log.

If you want to write your own messages to your own file then you will need to either write some code in the Execute Script operation or add your own custom component.

Avatar

Former Community Member

Hi,

I thought of using file read->append text->file over-write functionality in a short lived process. This will work fine for creating a custom log file provided that you consider following:

- This needs to be a short lived process or the database will grow a lot.

- You should clear the log file after it reaches certain size or it will be too slow down the track.

I've a sample lca which I created to achieve this and i'm happy to share.

To do this logging properly I would suggest that you create a table in a database and you should insert log messages there. This will allow you to prepare report will be more useful in production support. And implementing this would be easier than anything else.

hope this helps

Parth Pandya

http://blog.pandyaparth.com