mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 04:42:33 +02:00
no timestamp, color and sorting in systemd mode
This commit is contained in:
parent
a0be1f11d3
commit
486122f3d8
1 changed files with 6 additions and 1 deletions
|
@ -20,11 +20,16 @@ func main() {
|
|||
args := getArgs()
|
||||
|
||||
if isRunningAsService {
|
||||
logrus.SetFormatter(&logrus.JSONFormatter{})
|
||||
logrus.SetFormatter(&logrus.TextFormatter{
|
||||
DisableColors: true,
|
||||
DisableTimestamp: true,
|
||||
DisableSorting: true,
|
||||
})
|
||||
} else {
|
||||
logrus.SetFormatter(&logrus.TextFormatter{
|
||||
ForceColors: true,
|
||||
DisableColors: false,
|
||||
DisableSorting: true,
|
||||
FullTimestamp: true,
|
||||
TimestampFormat: "01-02 15:04:05",
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue