Closed miguelangel-nubla closed 2 months ago
How does this fix the issue stated?
In the EMQX UI you can enable the File log
logger under Cluster Settings
-> Logging
-> File Log
. Currently there is no location where you could save the log to survive a crash of the addon.
This would allow setting something like /share/emqx/logs/emqx.log
as the file and work.
Would also set that path by default while leaving the logger disabled be ok for this PR?
Currently there is no location where you could save the log to survive a crash of the addon.
There is, the data folder of the add-on: /data
As far as I know that folder is persistent across restarts, but only accessible from within the respective addon?
How can anyone be able read that folder without touching docker? What am I missing?
How can anyone be able read that folder without touching docker? What am I missing?
This should not be added to share
. If there is a need for an accessible data folder, then the add-on public data folder can be added instead.
Add-on public data folder seems a good choice.
~~The logs were currently saved to /data/emqx/log
, moving them to /config/log
means loosing auto backup.
Since logging to file is disabled by default I think it is a acceptable compromise.~~
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.
Not stale
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.
This update introduces a new configuration entry addon_config:rw
in emqx/config.yaml
. It also sets the EMQX_LOG_DIR
environment variable to "/config/log"
in the emqx/run
script, and removes the creation of /data/emqx/log
and the symbolic link for /opt/emqx/log
in the init-emqx/run
script.
File Path | Summary |
---|---|
emqx/config.yaml | Added addon_config:rw under the map section. |
emqx/rootfs/etc/s6-overlay/s6-rc.d/emqx/run | Exported EMQX_LOG_DIR with value "/config/log" . |
emqx/rootfs/etc/s6-overlay/s6-rc.d/init-emqx/run | Removed creation of /data/emqx/log and the symbolic link for /opt/emqx/log . |
In the config's quiet scroll,
A new line for control,
The logs now rest where they belong,
No more links that feel so wrong.
The EMQX breathes anew,
With paths defined, clean and true.
[!TIP]
You can generate walkthrough under a collapsible section
Enable the `reviews.collapse_walkthrough` setting in your project's settings in CodeRabbit to generate walkthrough in a markdown collapsible section.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Proposed Changes
Mount
share
folder in order to have a place where to save logs persistently and survive a crash.Summary by CodeRabbit
New Features
EMQX_LOG_DIR
.Chores