mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +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()
|
args := getArgs()
|
||||||
|
|
||||||
if isRunningAsService {
|
if isRunningAsService {
|
||||||
logrus.SetFormatter(&logrus.JSONFormatter{})
|
logrus.SetFormatter(&logrus.TextFormatter{
|
||||||
|
DisableColors: true,
|
||||||
|
DisableTimestamp: true,
|
||||||
|
DisableSorting: true,
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
logrus.SetFormatter(&logrus.TextFormatter{
|
logrus.SetFormatter(&logrus.TextFormatter{
|
||||||
ForceColors: true,
|
ForceColors: true,
|
||||||
DisableColors: false,
|
DisableColors: false,
|
||||||
|
DisableSorting: true,
|
||||||
FullTimestamp: true,
|
FullTimestamp: true,
|
||||||
TimestampFormat: "01-02 15:04:05",
|
TimestampFormat: "01-02 15:04:05",
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue