Description
logger is currently in Imports (moved there by #1209 to fix #1207). It is used for ~40 calls across the Shiny app (log_info, log_debug, log_warn, log_error, log_trace) and writes log files to a ./log directory on the server filesystem.
Writing log files to the filesystem is problematic in hosted/containerized environments and adds a dependency that could be avoided.
Proposed change
- Replace
logger with a lightweight internal logging wrapper that outputs to the R console via message().
- Capture the session log in memory so it can be included in the ZIP export when the user clicks "Save".
- Move
logger back to Suggests in DESCRIPTION.
Expected behaviour
- Log messages appear in the R console (stdout/stderr) as before.
- No log files are written to the filesystem.
- The session log is available as a text file in the ZIP export.
- The app works without
logger installed.
Related
Description
loggeris currently inImports(moved there by #1209 to fix #1207). It is used for ~40 calls across the Shiny app (log_info,log_debug,log_warn,log_error,log_trace) and writes log files to a./logdirectory on the server filesystem.Writing log files to the filesystem is problematic in hosted/containerized environments and adds a dependency that could be avoided.
Proposed change
loggerwith a lightweight internal logging wrapper that outputs to the R console viamessage().loggerback toSuggestsin DESCRIPTION.Expected behaviour
loggerinstalled.Related
aNCA::run_app()requires packages in theSuggestslist #1207 / fix: move required Shiny app packages from Suggests to Imports #1209