Setting lager_file_backend
path to non-default breaks ejabberd_loglevel:set/1
#352
Labels
lager_file_backend
path to non-default breaks ejabberd_loglevel:set/1
#352
There are two problems with changing a
lager_file_backend
path inapp.config
:ejabberd_loglevel:set/1
breaks,ejabberd_app:get_log_path/0
(same asejabberd_loglevel:log_path/0
seen in the logs below) and the path set inapp.config
forlager_file_backend
.In other words, there's no consistent (or any properly functioning?) interface for operations teams to set the logging path for MongooseIM to anything other than the default.
Please compare the two console logs. The first one uses the default path
log/ejabberd.log
and doesn't cause issues:While the second one uses adjusted
log-somewhere-else/ejabberd.log
and returns{error, bad_module}
fromejabberd_loglevel:set/1
. Moreover, the path returned byejabberd_loglevel:log_path/0
is not the path configured inapp.config
.Two obvious solutions come to mind (and maybe some more sophisticated ones exist):
app.config
, which by being visible suggest the options are tunable, though in fact they aren't.ejabberd_app:get_log_path/0
and the mechanism it uses to guess the logging path and rely completely onapp.config
lager settings.The text was updated successfully, but these errors were encountered: