The comment here:
any errors in the observers will be silently ignored because the observers are no longer run through the LogPublisher()
Note in that implementation that the `self._publisher` being replayed to is precisely the LogPublisher, with all the new observers added to it. Errors should be handled as normal.
Perhaps this is not happening in the correct order with the LoggingFile replacements for stdin/stdout/stderr, and should be taking place later?
1)
What are the intended difference between these two ways of installing a logobserver?
beginLoggingTo is meant to be the thing that you do at program start-up to take over from the boot-time buffering log observer.
addObserver is meant to be the thing that you do at any time during a program's run to add an observer for whatever other reason.
While the exact difference depends upon your application, in general, if you're setting up the "main" log observer for your process, you should probably be doing it with beginLoggingTo.
2)
I'd like to contribute a SyslogObserver for the new twister.logger scheme. See the _syslog.py file in the gist. It has been ported from the old logging scheme. Would this be useful to Twisted?
Absolutely!
I was uncertain what to do with log_failures in the observer. I see that dumping of log_failures has been removed from t.l.FileLogObserver(). What is the appropriate way to deal with log_failures?
In the proposal of SyslogObserver I addded a dumpTraceback option to the constructor to select if the tb should go to the syslog or not. (My application shall have tb to syslog.)
And, now that I look at your code, I can see that it's almost doing more or less exactly what I suggested with respect to log_failure, so, there you go, you're already doing it right :-). I'd probably default dumpTraceback to true - you probably do want to see tracebacks, if they're happening, and syslog is your primary log observer.
Thanks for using Twisted and thanks even more for your interest in improving our log tooling!