Usage of rotate_log api command #4156
Replies: 1 comment 1 reply
-
You are right, the rotate_log and reopen_log commands documentation make seem that they immediately perform those operations, but looking at the source code and its history, they are no longer relevant for those operations! Commit 07baf2d for ejabberd 16.01 introduced the rotate_log API command, and it worked as you expected. Commit e4a8afb for ejabberd 20.01 replaced the old Lager library with Logger, a new library included in Erlang/OTP 21. Since then, rotate_log and reopen_log commands no longer rotate or reopen, they just run ejabberd hooks:
It should get mentioned in the commands documentation that they lost their original purpose https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#rotate-log |
Beta Was this translation helpful? Give feedback.
-
Hey everyone,
I'm not sure whether this is an error in configuration or in understanding.
I tried to rotate my logs with the
rotate_log
api command, because I thought that this command would be a manual trigger to rotate the logs (while the log config options would be for automatic log rotation). However, and although the command is executed successfully, nothing happens and the logs are not rotating.Have I misunderstood how the command is supposed to work? Or may I have an error in my config?
Beta Was this translation helpful? Give feedback.
All reactions