2.1 KiB
2.1 KiB
Command Line Interface
LogWisp CLI options for controlling behavior without modifying configuration files.
Synopsis
logwisp [options]
General Options
--config <path>
Configuration file location.
- Default:
~/.config/logwisp.toml - Example:
logwisp --config /etc/logwisp/production.toml
--router
Enable HTTP router mode for path-based routing.
- Default:
false - Example:
logwisp --router
--version
Display version information.
--background
Run as background process.
- Example:
logwisp --background
Logging Options
Override configuration file settings:
--log-output <mode>
LogWisp's operational log output.
- Values:
file,stdout,stderr,both,none - Example:
logwisp --log-output both
--log-level <level>
Minimum log level.
- Values:
debug,info,warn,error - Example:
logwisp --log-level debug
--log-file <path>
Log file path (with file output).
- Example:
logwisp --log-file /var/log/logwisp/app.log
--log-dir <directory>
Log directory (with file output).
- Example:
logwisp --log-dir /var/log/logwisp
--log-console <target>
Console output destination.
- Values:
stdout,stderr,split - Example:
logwisp --log-console split
Examples
Basic Usage
# Default configuration
logwisp
# Specific configuration
logwisp --config /etc/logwisp/production.toml
Development
# Debug mode
logwisp --log-output stderr --log-level debug
# With file output
logwisp --log-output both --log-level debug --log-dir ./debug-logs
Production
# File logging
logwisp --log-output file --log-dir /var/log/logwisp
# Background with router
logwisp --background --router --config /etc/logwisp/prod.toml
Priority Order
- Command-line flags (highest)
- Environment variables
- Configuration file
- Built-in defaults (lowest)
Exit Codes
0: Success1: General error2: Invalid arguments
Signals
SIGINT(Ctrl+C): Graceful shutdownSIGTERM: Graceful shutdown