• Disable logging

    By Stefaan Somers 2 decades ago

    Is there an option in OpenLog, to disable logging at a certain time. For example no logging in production, and start teh logging when troubleshooting

    • By Eric H Romo 2 decades ago

      see my idea on "Setting a Level(or Threshhold) to limit LogEvent"



      http://www.openntf.org/Projects/pmt.nsf/ProjectView!ReadForm&Start=1&Count=300&Expand=1&Query=OpenLog~FeatureRequests



      Basically its a small addition to OpenLog's code of setting a global level for event logging. You could use this to set the globalLogEventLevel to log only events that reached a certain level of severity.

      • By Eric H Romo 2 decades ago

        I should add that using the above approach and combining it with a profile document would make sense.



        Your code would read the profile doc and see what the loglevel had been set to, and the modified LogEvent method would adjust accordingly.

      • Hmmm... :-)

        By John Smart 2 decades ago

        I hadn't read your response before submitting mine, Eric.



        I like yours better.

    • No but...

      By John Smart 2 decades ago

      I ain't the man™, but I'll answer anyway.



      The answer is "no", but there are things you can do.



      You can write an agent to delete all docs older than a day, for example.



      If you're just using OpenLog in a single app, you can edit the script libraries, stick a constant like

      Const OPENLOG_DISABLED = True

      and then put

      If OPENLOG_DISABLED Then Exit Sub

      at the top of the functions you use. By using the constant it's easy to enable logging by changing it to False.



      Or if you can't make changes to production code easily, you could use a profile document rather than a constant.



      As another developer, I'd urge you to reconsider whether or not you really want to turn off OpenLog. Provided you automatically delete old log documents, it's a really good tool for being able to check up on applications and be automatically notified when something goes wrong.