mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
logger: add a flag to use UTC time for logging
This commit is contained in:
@@ -39,7 +39,7 @@ The `serve` command supports the following flags:
|
||||
- `--log-max-backups` int. Maximum number of old log files to retain. Default 5 or the value of `SFTPGO_LOG_MAX_BACKUPS` environment variable. It is unused if `log-file-path` is empty.
|
||||
- `--log-max-size` int. Maximum size in megabytes of the log file before it gets rotated. Default 10 or the value of `SFTPGO_LOG_MAX_SIZE` environment variable. It is unused if `log-file-path` is empty.
|
||||
- `--log-verbose` boolean. Enable verbose logs. Default `true` or the value of `SFTPGO_LOG_VERBOSE` environment variable (1 or `true`, 0 or `false`).
|
||||
- `--profiler` boolean. Enable the built-in profiler. The profiler will be accessible via HTTP/HTTPS using the base URL "/debug/pprof/". Default `false` or the value of `SFTPGO_PROFILER` environment variable (1 or `true`, 0 or `false`).
|
||||
- `--log-utc-time` boolean. Enable UTC time for logging. Default `false` or the value of `SFTPGO_LOG_UTC_TIME` environment variable (1 or `true`, 0 or `false`)
|
||||
|
||||
Log file can be rotated on demand sending a `SIGUSR1` signal on Unix based systems and using the command `sftpgo service rotatelogs` on Windows.
|
||||
|
||||
|
||||
@@ -20,27 +20,32 @@ Flags:
|
||||
starting directory. The home directory for a new
|
||||
user will be:
|
||||
|
||||
<base-home-dir>/<username>
|
||||
[base-home-dir]/[username]
|
||||
|
||||
base-home-dir must be an absolute path.
|
||||
-c, --config-dir string Location for SFTPGo config dir. This directory
|
||||
should contain the "sftpgo" configuration file
|
||||
or the configured config-file and it is used as
|
||||
the base for files with a relative path (eg. the
|
||||
private keys for the SFTP server, the SQLite
|
||||
database if you use SQLite as data provider).
|
||||
-c, --config-dir string Location for the config dir. This directory
|
||||
is used as the base for files with a relative
|
||||
path, eg. the private keys for the SFTP
|
||||
server or the SQLite database if you use
|
||||
SQLite as data provider.
|
||||
The configuration file, if not explicitly set,
|
||||
is looked for in this dir. We support reading
|
||||
from JSON, TOML, YAML, HCL, envfile and Java
|
||||
properties config files. The default config
|
||||
file name is "sftpgo" and therefore
|
||||
"sftpgo.json", "sftpgo.yaml" and so on are
|
||||
searched.
|
||||
This flag can be set using SFTPGO_CONFIG_DIR
|
||||
env var too. (default ".")
|
||||
-f, --config-file string Name for SFTPGo configuration file. It must be
|
||||
the name of a file stored in config-dir not the
|
||||
absolute path to the configuration file. The
|
||||
specified file name must have no extension we
|
||||
automatically load JSON, YAML, TOML, HCL and
|
||||
Java properties. Therefore if you set "sftpgo"
|
||||
then "sftpgo.json", "sftpgo.yaml" and so on
|
||||
are searched.
|
||||
--config-file string Path to SFTPGo configuration file.
|
||||
This flag explicitly defines the path, name
|
||||
and extension of the config file. If must be
|
||||
an absolute path or a path relative to the
|
||||
configuration directory. The specified file
|
||||
name must have a supported extension (JSON,
|
||||
YAML, TOML, HCL or Java properties).
|
||||
This flag can be set using SFTPGO_CONFIG_FILE
|
||||
env var too. (default "sftpgo")
|
||||
env var too.
|
||||
-h, --help help for startsubsys
|
||||
-j, --log-to-journald Send logs to journald. Only available on Linux.
|
||||
Use:
|
||||
@@ -50,6 +55,9 @@ Flags:
|
||||
To see full logs.
|
||||
If not set, the logs will be sent to the standard
|
||||
error
|
||||
--log-utc-time Use UTC time for logging. This flag can be set
|
||||
using SFTPGO_LOG_UTC_TIME env var too.
|
||||
(default true)
|
||||
-v, --log-verbose Enable verbose logs. This flag can be set
|
||||
using SFTPGO_LOG_VERBOSE env var too.
|
||||
(default true)
|
||||
|
||||
Reference in New Issue
Block a user