update 2023-09-20 23:36:21
This commit is contained in:
parent
ec57912b37
commit
625308b43a
|
@ -1,6 +1,6 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"PO-Revision-Date: 2023-03-23 14:42+0000\n"
|
"PO-Revision-Date: 2023-09-18 15:45+0000\n"
|
||||||
"Last-Translator: David Rapaň <david@rapan.cz>\n"
|
"Last-Translator: David Rapaň <david@rapan.cz>\n"
|
||||||
"Language-Team: Czech <https://hosted.weblate.org/projects/openwrt/"
|
"Language-Team: Czech <https://hosted.weblate.org/projects/openwrt/"
|
||||||
"luciapplicationsnft-qos/cs/>\n"
|
"luciapplicationsnft-qos/cs/>\n"
|
||||||
|
@ -8,7 +8,7 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
||||||
"X-Generator: Weblate 4.16.2-dev\n"
|
"X-Generator: Weblate 5.0.2\n"
|
||||||
|
|
||||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:136
|
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:136
|
||||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:155
|
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:155
|
||||||
|
@ -202,7 +202,7 @@ msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:222
|
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:222
|
||||||
msgid "Service"
|
msgid "Service"
|
||||||
msgstr ""
|
msgstr "Služba"
|
||||||
|
|
||||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:125
|
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:125
|
||||||
msgid "Static QoS-Download Rate"
|
msgid "Static QoS-Download Rate"
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
From 7c6a252ab3f7d9aeb743f9fa8d0cc8c7402f984d Mon Sep 17 00:00:00 2001
|
||||||
|
From: sbwml <admin@cooluc.com>
|
||||||
|
Date: Wed, 20 Sep 2023 20:52:27 +0800
|
||||||
|
Subject: [PATCH] format logtime
|
||||||
|
|
||||||
|
---
|
||||||
|
mlog/logger.go | 15 +++++++++++++--
|
||||||
|
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/mlog/logger.go b/mlog/logger.go
|
||||||
|
index c8b08a9..b44c88d 100644
|
||||||
|
--- a/mlog/logger.go
|
||||||
|
+++ b/mlog/logger.go
|
||||||
|
@@ -1,17 +1,28 @@
|
||||||
|
package mlog
|
||||||
|
|
||||||
|
-import "go.uber.org/zap"
|
||||||
|
+import (
|
||||||
|
+ "time"
|
||||||
|
+
|
||||||
|
+ "go.uber.org/zap"
|
||||||
|
+ "go.uber.org/zap/zapcore"
|
||||||
|
+)
|
||||||
|
|
||||||
|
var logger = mustInitLogger()
|
||||||
|
|
||||||
|
func mustInitLogger() *zap.Logger {
|
||||||
|
- l, err := zap.NewDevelopment(zap.WithCaller(false))
|
||||||
|
+ config := zap.NewDevelopmentConfig()
|
||||||
|
+ config.EncoderConfig.EncodeTime = customTimeEncoder
|
||||||
|
+ l, err := config.Build(zap.WithCaller(false))
|
||||||
|
if err != nil {
|
||||||
|
panic("failed to init mlog:" + err.Error())
|
||||||
|
}
|
||||||
|
return l
|
||||||
|
}
|
||||||
|
|
||||||
|
+func customTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder) {
|
||||||
|
+ enc.AppendString(t.Format("2006-01-02 15:04:05"))
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
func L() *zap.Logger {
|
||||||
|
return logger
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.8
|
||||||
|
|
Loading…
Reference in New Issue