|
Good points. Good you point these out. We just want the functionality the library provides not all the overhead.
|
|
|
|
|
"plus, libraries shouldn't log"
I don't think this is a realistic assumption. Libraries can have bugs too. In case a bug happens, they would want to know what led to it -> thus, logging.
And more to the point, when an error happens in your application - libraries can have huge APIs, complex usage scenarios - in such a case, you + the lib's authors would probably want to know: is there an error in the lib, in your code, both? Without logging, this would be much more complicated.
Best,
John
-- LogWizard - Log viewing can be a joy!
|
|
|
|
|
That's what Exceptions are for. Logging should be done only at the highest levels of an application. Would you want each library to log to a different place? And then have to read them all and try to figure what order they happended in? I wouldn't.
Additionally, logging itself can be error-prone. If a disk fills up, and a library tries to log that, but can't because the disk is full -- that's a very bad situation.
The application may log to a different disk, or a database, or a Web Service, or send messages across a socket to a monitoring system.
With an Exception, the calling routine can add detail and context to the Exception's Data collection, or possibly wrap the Exception in a more meaningful Exception.
The library developer also doesn't know what format the application developer wants to use. I like XML, not everyone does.
Libraries should only raise Exceptions, never try to log -- you don't know what the application developer wants to do with it.
|
|
|
|
|
Let me reiterate - what if the library has some bugs?
You do logging in order to catch possible bugs, especially when the app is run somewhere else. From the library's standpoint - that will always be the case (it will be run somewhere else).
|
|
|
|
|
That makes no sense. If it has bugs, how will it know to log them?
If it wants to allow the caller to review the internal state, it can have appropriate methods, or perhaps events, to do that. It should not log.
|
|
|
|
|
The idea is - when a bug happens, to look at the log, and see if you can infer enough information to reproduce/fix the issue.
Apparently, we're talking two different languages. So lets just agree to disagree.
Best,
John
|
|
|
|
|
Quote: Do I have to include log4net just because I need to use your library? Do as the spec says.
Wonde Tadesse
|
|
|
|
|
Oh wait, but .NET was supposed to end DLL hell.
Jeremy Falcon
|
|
|
|
|
|
https://mail.python.org/pipermail/tutor/2003-October/025932.html
Nothing is really private in python. No class or class instance can
keep you away from all what's inside (this makes introspection
possible and powerful). Python trusts you. It says "hey, if you want
to go poking around in dark places, I'm gonna trust that you've got
a good reason and you're not making trouble."
After all, we're all consenting adults here.
|
|
|
|
|
....of D-language! There everything can be overriden. Not so "everything" as in Smalltalk, but enough to program w/o pain.
|
|
|
|
|
I always try to discourage third party products.
My argument is, you buy them for their solutions, but you also get their problems. Their priority on fixing those problems do not necessarily match yours.
Earlier in my career we encountered an intractable problem with a third party product. We called them and told them of the problem. They said, yeah, that will get fixed in the next release. Great! When's the next release? In six months. We had a six week delivery deadline.
My solution was simple, throw it away and write our own. Ours was smaller, faster, did just what we needed, and was under our control for bugs and future enhancements.
Psychosis at 10
Film at 11
Those who do not remember the past, are doomed to repeat it.
Those who do not remember the past, cannot build upon it.
|
|
|
|
|
If you keep seeing Mickey Mouse and Pluto when you stand up, are you having Disney spells?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
What the duck are you on about?
Life is too shor
|
|
|
|
|
When I stand up it just goes all black because there Snow White!
|
|
|
|
|
You Frozen me with that, Elsa I'd have answered with something witty.
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
"When you have eliminated the JavaScript, whatever remains must be an empty page." -- Mike Hankey
|
|
|
|
|
Maybe, or else your just getting goofy.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
I think someone slipped him a Mickey.
/ravi
|
|
|
|
|
You're right, he is sounding a bit Dopey.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Na, it was only a Minnie
Mongo: Mongo only pawn... in game of life.
|
|
|
|
|
jiminy crickets, you're right!
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Don't be Goofy.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I'm going to have to pooh-pooh that idea.
|
|
|
|
|
I Donald know about that...
|
|
|
|
|
You will be shocked with a 440 Walt, if you came to know.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|