Title: | Tools for Analyzing ShinyProxy Containers Logs |
---|---|
Description: | Provides functions to parse and analyze logs generated by ShinyProxy containers. It extracts metadata from log file names, reads log contents, and computes summary statistics (such as the total number of lines and lines containing error messages), facilitating efficient monitoring and debugging of ShinyProxy deployments. |
Authors: | Thibault Senegas [aut, cre] |
Maintainer: | Thibault Senegas <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2025-03-25 06:36:14 UTC |
Source: | https://github.com/tsenegas/shinyproxylogs |
This function scans a specified directory, extracts metadata from the log file names, reads their content, and computes some statistics (total number of lines and the number of lines containing "error" or "exception"). Additionally, it retrieves ShinyProxy user information from a separate directory of logs.
analyze_logs(path_container_logs, path_shinylogs = NULL)
analyze_logs(path_container_logs, path_shinylogs = NULL)
path_container_logs |
Character. The path to the directory containing the container logs files. |
path_shinylogs |
Character. The path to the directory containing ShinyProxy identity logs. |
A list containing two data frames:
Detailed information for each file.
Summary information grouped by container (based on specId
, proxyId
, and startupTime
).
## Not run: result <- analyze_logs("path/to/containersLogs", "path/to/shinylogs") print(result$summary) ## End(Not run)
## Not run: result <- analyze_logs("path/to/containersLogs", "path/to/shinylogs") print(result$summary) ## End(Not run)
This function parses the name of a log file generated by ShinyProxy and extracts metadata:
specId
, proxyId
, startupTime
, and logType
.
parse_log_filename(filename)
parse_log_filename(filename)
filename |
Character. The full path to the log file. |
A data frame with the columns specId
, proxyId
, startupTime
, and logType
.
## Not run: parse_log_filename( "path/to/containersLogs/log_file_(stdout|stderr).log" ) ## End(Not run)
## Not run: parse_log_filename( "path/to/containersLogs/log_file_(stdout|stderr).log" ) ## End(Not run)