summaryrefslogtreecommitdiff
path: root/lib/rbot/logger.rb
AgeCommit message (Collapse)Author
2021-06-05logger: fix STDERR recursionGiuseppe Bilotta
Overriding (as we should do) the standard error write method when daemonizing introduces a recursion in the logger, due to the persistent presence of the console logger. The solution is obviously to stop logging on console after daemonization.
2021-05-29fix: restart logger thread after forkGiuseppe Bilotta
Logging was broken when daemonizing, due to the logger thread being dead after the fork. This can be solved by restarting the thread, if necessary when setting the log file (which we conveniently do right after the fork).
2021-05-29fix: preserve loglevels across options and filesGiuseppe Bilotta
2020-03-31refactor: logger moved away from ircbot (exp.)Matthias Hecker
This moves the logger management thread/queue to a seperate singleton. It removes the explicit stopping/restarting of the logging thread since the thread should behave like a daemon thread anyway. Still needs to be tested to work in daemonize.