Files
2012-02-21 01:15:00 -05:00

1 line
3.3 KiB
JSON

[{"user_id": 2376, "stars": [], "topic_id": 34184, "date_created": 1304791157.6478741, "message": "Reading this discussion at StackOverflow http://stackoverflow.com/questions/153524/code-to-logging-ratio and wondering. While writing apps, how much and what do you log?\n\nDo you agree with \"visible logging code is clutter and like excessive comments, it actively obscures the code that's doing the real work in the application\" point made by Jeff Atwood in his post http://www.codinghorror.com/blog/2008/12/the-problem-with-logging.html ?", "group_id": 292, "id": 951918}, {"user_id": 3617, "stars": [], "topic_id": 34184, "date_created": 1304792991.1017599, "message": "@abhinavsood No. Logging is vital to tracking down problems. Sure you can have way too much logging, but it shouldn't be left out just because it makes it a tad harder to read.", "group_id": 292, "id": 952108}, {"user_id": 28054, "stars": [], "topic_id": 34184, "date_created": 1304870003.713836, "message": "@abhinavsood Verbose logging has helped me debug production issues many times. The only downside is performance. Wrap debug logging in isEnabledFor() calls so that you don't waste CPU building log strings you don't log when you turn off debug level logging. This is most important if you do debug logging inside of loops.", "group_id": 292, "id": 958133}, {"user_id": 32604, "stars": [], "topic_id": 34184, "date_created": 1304880542.426676, "message": "@abhinavsood Logging is definitely important and cannot be ignored but at the same time your code seems to be obscure. I have some experience working with a new kind of programming concept that lets you write all the logging code in just one class and calls the methods automatically. Sounds magical ! I know but it is true just Google AOP(Aspect Oriented Programming), its built upon the fact that most applications have certain cross cutting concerns. It has been implemented on almost all the languages using some 3rd party libraries. I have used AspectJ which is for Java, but I am sure there must be some for Python as well. So using this you can write your code without much logging and then even write the logging code at a later stage when you are testing your app!", "group_id": 292, "id": 959401}, {"user_id": 2376, "stars": [], "topic_id": 34184, "date_created": 1305009914.8555601, "message": "Thanks, you guys. This is helpful. One of my friends is writing an app using WordPress and we had a good debate on this topic. Just when we were finally about to settle - he brought up that he'll be logging errors and other information to the database instead of flat files. I don't think that's a good idea! or, is it? I mean, metrics and stuff like that in DB - cool, but logs?", "group_id": 292, "id": 985964}, {"user_id": 11592, "stars": [], "topic_id": 34184, "date_created": 1305181720.174077, "message": "@abhinavsood just use syslog and let admin configure it as he likes", "group_id": 292, "id": 1020966}, {"user_id": 3617, "stars": [], "topic_id": 34184, "date_created": 1305183606.9155991, "message": "@abhinavsood Seems a bit overkill, but it really depends on what exactly he's logging. For example logging 404 errors to a DB for use with a redirection plugin makes sense, but just logging them for an admin to see might not be all that useful.", "group_id": 292, "id": 1021183}]