Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add configuration directive to enable/disable MarkUs logging overall #63
As of MarkUs 0.6 we will be using MarkUsLogger. Apart from the time it takes to write the logs, MarkUs has to do some additional querying for some statements to log. It would be good if we could refactor this so that sys admins could disable MarkUs logging totally to avoid this small performance penalty.
referenced this issue
Jan 22, 2013
I realize now that I probably should have asked another question before working on this. Please check the solution I posted in the pull request. I justified the logic in the pull request description.
If anyone feels that the additional LOC are unwarranted, given the priority of this feature, I'll just add a check in MarkusLogger.log() to prevent writing to the file.
Edit: Nevermind - I'll just do the check in MarkusLogger.log(). Further review shows that only a few log statements would actually benefit from these code changes, and that's not enough to justify the complication.
This was referenced
Jan 22, 2013
As detailed in the commit changes, setting MARKUS_LOGGING_ENABLED = false in config/environments/test.rb will cause MarkusLogger related Unit Tests to fail. I'm not sure what expected behaviour makes more sense. That they would fail, or that they would pass? If we'd rather they pass, I could just wrap them in a conditional block checking markus_config_logging_enabled? Would appreciate some input on this.