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