Menu

Logging

2010-01-27
2013-05-28
  • Mihael Schmidt

    Mihael Schmidt - 2010-01-27

    There is a project called LOG4RPG from Thomas Raddatz which has various log file appenders.

    http://www.tools400.de/English/Freeware/Service_Programs/Log4rpg/log4rpg.html

    If you want to have the log in a database file to have a quick start with it you can provide the full qualified IFS file path in the properties file. Another way would be to write a DatabaseFileAppender service program.

    Else logging into a stream file works out of the box.

     
  • Aaron Bartell

    Aaron Bartell - 2010-01-28

    Thanks for posting this Mihael!  Now for some more discussion on logging…

    1) At what points should logging take place? (I am guessing at all potential failure points - see https://sourceforge.net/apps/mediawiki/rpgui/index.php?title=Main_Page#Flow_Of_Processing)

    2) What things are logged (i.e. errors, warnings, notifications, informational, debug)? 

    3) Should logging be configurable (i.e. turn it on and off without the need to recompile)?

    4) Should logging be able to be turned on just for a single job?

    5) Have a web app that can be used to easily query logs (i.e. a DB2 table) and also have the capability to display a particular jobs job log.

    What else should be considered?

    aaronbartell.com

     
  • Alan

    Alan - 2010-01-28

    I think it should be configurable. Not just to turn it on and off, but to also change the level of the logging (i.e. errors, warnings, notifications, informational, debug)

     
  • Dave Sager

    Dave Sager - 2010-01-28

    I would not only make it configurable, but I think it should have the option to allow *hard* errors to e-mail the details directly to a support e-mail address.  This way we have something production-ready right out of the shoot.  Obviously having a standard error reporting routine that deals with all the SMTP stuff would be good. :D

     
  • Mihael Schmidt

    Mihael Schmidt - 2010-01-28

    E-Mail notification on hard errors: write an EmailAppender and configure it in the properties file. Shouldn't be too hard. Perhaps you first should take a look at LOG4RPG.

     
  • Dave Sager

    Dave Sager - 2010-01-28

    If you are referring to the site http://www.tools400.de/English/Freeware/Service_Programs/Log4rpg/log4rpg.html then I guess I will need you to provide me with additional information, Mihael.  The help text they have is formatted for W2K/XP, and I cannot open it on my Vista PC (once again bitten by M$' inability to provide backwards compatibility).  I suspect that it would be very much what I asked for, but at this point I cannot say for sure.

    Also, would not the author have to either agree to donate the code or in some other way grant a license to use it with RPGUI?

     
  • Mihael Schmidt

    Mihael Schmidt - 2010-01-28

    AFAIK all freeware on the tools400.de website is licensed under GPL, see http://www.tools400.de/English/Freeware/freeware.html

    You can have multiple appenders react on a single log event (just like in log4j). So having the "normal" log in the file and also the email notification on fatal errors is no problem.

     

Log in to post a comment.