The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
65 views

Encapsulating logging and throwing exceptions into a method. Bad practice?

original code example if (var1 == null) { String msg = "var 1 is null"; logger.log(msg); throw new CustomException(msg); } if (var2 == null) { String msg = "var 2 is null"; ...
2
votes
2answers
45 views

Wrapping an Exception with context-management, using the with statement

Before I try to make this work, I wondered if anyone had tried this, whether it was a good idea or not, etc. I find myself doing this a lot: if some_result is None: try: raise ...
4
votes
4answers
150 views

Little log engine in C

I programmed a little log engine in C I plan to use in my project and maybe some others in future. I am very novice C programmer and would like to have feedback of some experienced ones on this. It's ...
0
votes
2answers
319 views

ASP.net proper login - logout classes - control login status

Would you have any suggestions improvements for the below functions classes ? Ok here how do i make a registered member login HttpCookie LoginInfo = new HttpCookie("LoginInfo"); ...
2
votes
5answers
194 views

Does this code contain any hidden bugs, performance issues?

This is a piece of C89 code testing a function titled 'logging_function', which takes two arguments and uses them to log a bit of information. In this case, the first argument to the function is the ...
2
votes
0answers
76 views

Logging system safety

I've created a logging system with one-use passwords (sent via SMS API). What I would like to know is if it's "safe". I know it is hard to estimate safety but I am curious if it is safer than regular ...
4
votes
1answer
133 views

How's my approach to logging?

I was surprised that I didn't find this approach to logging anywhere while reading up on the subject. So, naturally, I think I may be doing something wrong. I set up some simple tests, and this seems ...
2
votes
2answers
452 views

Robust logging solution to file on disk from multiple threads on serverside code

I have implemented a socket listener that runs on my Linux Ubuntu server accepting connections and then starting up a new thread to listen on those connections (classic socket listener approach). ...
4
votes
4answers
496 views

How do I improve this logging mechanism?

There are quite a few things I am considering: I will have to check for null values I will have serious trouble persisting it in the database. How do I improve this or re-factor this for better ...