mirror of
https://github.com/restic/rest-server.git
synced 2025-12-07 09:36:13 -08:00
feat: allow logging to stdout
The --log option accepts "-" as filename. This prevents rest-server from opening the log file, it simply writes to the STDOUT stream provided by the caller. **BREAKING** in case use really used "-" to specify a file named "-" you'll need to update your rest-server invocation to use "./-".
This commit is contained in:
@@ -46,7 +46,7 @@ func init() {
|
||||
flags.StringVar(&cpuProfile, "cpu-profile", cpuProfile, "write CPU profile to file")
|
||||
flags.BoolVar(&server.Debug, "debug", server.Debug, "output debug messages")
|
||||
flags.StringVar(&server.Listen, "listen", server.Listen, "listen address")
|
||||
flags.StringVar(&server.Log, "log", server.Log, "write HTTP requests in the combined log format to the specified `filename`")
|
||||
flags.StringVar(&server.Log, "log", server.Log, "write HTTP requests in the combined log format to the specified `filename` (use \"-\" for logging to stdout)")
|
||||
flags.Int64Var(&server.MaxRepoSize, "max-size", server.MaxRepoSize, "the maximum size of the repository in bytes")
|
||||
flags.StringVar(&server.Path, "path", server.Path, "data directory")
|
||||
flags.BoolVar(&server.TLS, "tls", server.TLS, "turn on TLS support")
|
||||
|
||||
Reference in New Issue
Block a user