4 Replies Latest reply on Aug 6, 2009 4:17 PM by parth pandya

    Watched folder log

    Mancini21 Level 1

      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.

        • 1. Re: Watched folder log
          Paul Butenko Level 3

          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

          • 2. Re: Watched folder log
            Mancini21 Level 1

            How can i make my own log?

            • 3. Re: Watched folder log
              Hodmi Level 4

              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.

              • 4. Re: Watched folder log
                parth pandya Level 2

                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