diff options
| author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-08-11 18:34:07 +0100 |
|---|---|---|
| committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-08-11 18:34:07 +0100 |
| commit | 5ff902b4d2118d5d451d976c7287f27f0d4c65da (patch) | |
| tree | ea608198e2430f131fd4af03b3653c6d3cb21823 /src/rabbit.erl | |
| parent | f6f03b1afc93639d4cc5f4c66a2e9392506b434c (diff) | |
| download | rabbitmq-server-git-5ff902b4d2118d5d451d976c7287f27f0d4c65da.tar.gz | |
only allow the rabbit error logger to touch the files and append rather than overwrite
If the standard error logger is initialised with the correct file
names, the files will be overwritten. So, we no longer tell Erlang
the location of the files at boot. It will automatically register an
error_logger_tty_h, which we then unregister after setting up our own
loggers (you can't swap a file logger for a tty logger).
Still left todo:
- error loggers when stopping rabbit,
- windows rabbitmq-server.bat,
- the other head of ensure_working_log_handlers,
- it doesn't really make sense to swap out the non exitent
error_logger_file_h.
Diffstat (limited to 'src/rabbit.erl')
| -rw-r--r-- | src/rabbit.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index 46f7d9d1f3..c855a806eb 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -446,7 +446,7 @@ ensure_working_log_handlers() -> error_logger_tty_h, log_location(kernel), Handlers), - + error_logger:delete_report_handler(error_logger_tty_h), ok = ensure_working_log_handler(sasl_report_file_h, rabbit_sasl_report_file_h, sasl_report_tty_h, @@ -477,7 +477,7 @@ ensure_working_log_handler(OldFHandler, NewFHandler, TTYHandler, end. log_location(Type) -> - case application:get_env(Type, case Type of + case application:get_env(rabbit, case Type of kernel -> error_logger; sasl -> sasl_error_logger end) of |
