Logging

I'd like a way to turn general logging off but to still allow myself to log items when *I* want to.

Is there a way to turn verbose (command-by-command) logging off but allow me to use Log, LogWarning, and LogError?

Comments

  • EggplantMattEggplantMatt ForumAdmin admin
    Hi, Peter:

    Once again, you raise an interesting point that has us talking amongst ourselves. We're looking into how, when, and whether to turn off the logging of the SetLogging off message. Its purpose is to provide a record that logging has been disabled -- some people have expressed concern that turning off logging more or less invisibly is undesireable because it could be abused. The scenarios are not all that likely, it seems, but the possibility exists.

    Anyway, your current solution is about as close as you can get to what you want at the moment. One other thing to think about is that it would be fairly easy to write a SenseTalk script to parse the logfile and remove those unwanted log lines - you could even call it from the scheduler after each script run. If you decide to do that yourself, please share it with us on the Examples forum.
  • Matt -

    You're right; knowing when logging was turned off is definitely something that folks might want, so noting that in the log isn't a bad idea.

    As such, may I pose another suggestion:

    You divide logging into two categories: user logging (calls to Log, LogWarning, and LogError) and automatic logging (log entries that are not user-directed).

    Then you add APIs to support setting the user logging vs. automatic logging states, so I can have one on and one off.

    Peter
Sign In or Register to comment.