diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-18 15:42:43 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-18 15:42:43 +0100 |
commit | d84d5fb931850955a9eb0f4a0edd0b6a00dc8ed9 (patch) | |
tree | 79b6b33a035ae4024ea249d6618525532075b600 /bin/mauveserver | |
parent | eb76e0b20da5ac71f304a930df5c0f9fcf56652b (diff) |
* Fixed up log rotation.
* Added a couple of exception catches.
Diffstat (limited to 'bin/mauveserver')
-rwxr-xr-x | bin/mauveserver | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/mauveserver b/bin/mauveserver index 9d1cf53..24eb168 100755 --- a/bin/mauveserver +++ b/bin/mauveserver @@ -117,8 +117,16 @@ end new.formatter = old.formatter new.level = old.level - Mauve::Server.instance.logger.outputters << new - Mauve::Server.instance.logger.outputters.delete(old) + Mauve::Server.instance.logger.info "Closing #{old.filename}." + + # + # Delete the outputter from each logger. + # + Log4r::Logger.each_logger do |l| + l.outputters << new + l.outputters.delete(old) + end + old.close Mauve::Server.instance.logger.info "Opened #{new.filename}." |