You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--log level=<level> # Set log level (debug, info, warn, error, fatal, panic)
--log file=<path> # Path to the log file
--log aggregation.enabled=<true/false> # Enable log aggregation
--log aggregation.flush-interval=<interval> # Aggregation interval (e.g., "5s", "1m", "1h")
--log filters.include.msg=<message> # Include messages containing this string (multiple allowed)
--log filters.include.package=<package> # Include messages from this package (multiple allowed)
--log filters.include.file=<file> # Include messages from this file (multiple allowed)
--log filters.include.level=<level> # Include messages with this log level or higher (multiple allowed)
--log filters.include.regex=<pattern> # Include messages matching this regex pattern (multiple allowed)
--log filters.exclude.msg=<message> # Exclude messages containing this string (multiple allowed)
--log filters.exclude.package=<package> # Exclude messages from this package (multiple allowed)
--log filters.exclude.file=<file> # Exclude messages from this file (multiple allowed)
--log filters.exclude.level=<level> # Exclude messages with this log level (multiple allowed)
--log filters.exclude.regex=<pattern> # Exclude messages matching this regex pattern (multiple allowed)
The following design describes the config:
log:
level: info # Log level (debug, info, warn, error, fatal, panic) (default: info)file: ""# Path to the log file (optional, defaults to stdout)aggregation:
enabled: false # Enable log aggregation (default: false)flush-interval: "5s"# Aggregation interval (e.g., "5s", "1m", "1h") (default: "5s")filters: # Filter log messagesinclude: # Include messages based on criteria (optional)msg:
- SampleMessage1 # Include messages containing this stringpackage:
- package1 # Include messages from this packagefile:
- file1.go # Include messages from this filelevel:
- warn # Include messages with this log level or higherregex:
- ^pattern1 # Include messages matching this regex patternexclude: # Exclude messages based on criteria (optional)msg:
- ExcludedMessage1 # Exclude messages containing this stringpackage:
- excludedPackage # Exclude messages from this packagefile:
- excludedFile.go # Exclude messages from this filelevel:
- debug # Exclude messages with this log levelregex:
- ^excludedPattern # Exclude messages matching this regex pattern
Implementation Notes:
Multiple values: Ensure the implementation correctly handles flags that can accept multiple values (e.g., --log filters.include.msg).
Regular expressions: Implement proper parsing and handling of regular expressions in filter flags.
Log level validation: Validate log level values to ensure they are valid levels.
Aggregation interval parsing: Implement parsing of the flush-interval value to handle different time units (seconds, minutes, hours).
Configuration merging: Define how CLI flags and configuration file settings will be merged, with CLI flags potentially overriding config file values.
The text was updated successfully, but these errors were encountered:
Tasks
The following design describes the CLI flag:
The following design describes the config:
Implementation Notes:
--log filters.include.msg
).flush-interval
value to handle different time units (seconds, minutes, hours).The text was updated successfully, but these errors were encountered: