mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-18 07:24:31 +01:00
no timestamp, color and sorting in systemd mode
This commit is contained in:
@@ -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",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user