cinchrb / cinch

The IRC Bot Building Framework
http://www.rubydoc.info/gems/cinch
MIT License
1k stars 180 forks source link

Fatal Logging modes #192

Open Casao opened 9 years ago

Casao commented 9 years ago

Adds support for fatal logging level - fixes #141

dominikh commented 9 years ago

This makes me wonder why we need both fatal and error. error, if it worked correctly, would look exactly like fatal. fatal, to me, has the connotation of not permitting any further code to execute, so maybe it should raise an exception instead? Only that then we wouldn't need fatal at all, the user could just use raise (and we'd even display that exception nicely formatted.)

Casao commented 9 years ago

From my experience, fatal logging is just logging, and the exit is left up to the calling code. Fatal is basically some sugar to state why it shut down

dominikh commented 9 years ago

Well, where I come from (Go), log.Fatal will actual exit the program, too.

Anyway, if "fatal logging is just logging", we should still determine how it would be different from "error logging", which would also use !! and be red. If they look exactly the same, we don't need both. Now the question is whether we should make one of the two look different, or if one of them should be dropped completely.