yapep_base
yapep_base copied to clipboard
SyslogHandling ErrorHandling
When a project is using Syslog for logging, and the syslog is down on the server for any reason it will result a 500 error in most of the cases. Just stop syslog-ng on a dev server and test a project The class should ignore these kind of errors in a way so it should not bring down the whole application
I'm not sure I agree with this one. It's the same in my opinion as if the database server went down.
We could potentially postpone this being an issue by deferring connection to the syslog socket till it's actually needed instead of it happening when the object is constructed, however syslog not being available, when you try to log something should still be an exception.
I know what you mean and I agree, of course it is crucial but not as essential as a db connection in most of the cases. I agree with you proposition to defer the connection , and I would also consider to make this extra behavior somehow configurable so I could tell that not being able to connect to syslog should kill the application or not.
Yes, that configuration option sounds quite useful for example for a dev environment.