mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
cmd: refactoring Run function
So it's easier, more clear, more isolation between code on non-mobile and mobile platforms.
This commit is contained in:
committed by
Cuong Manh Le
parent
507c1afd59
commit
bed7435b0c
+5
-3
@@ -35,6 +35,7 @@ var (
|
||||
|
||||
mainLog atomic.Pointer[zerolog.Logger]
|
||||
consoleWriter zerolog.ConsoleWriter
|
||||
noConfigStart bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -65,7 +66,8 @@ func normalizeLogFilePath(logFilePath string) string {
|
||||
return filepath.Join(dir, logFilePath)
|
||||
}
|
||||
|
||||
func InitConsoleLogging() {
|
||||
// initConsoleLogging initializes console logging, then storing to mainLog.
|
||||
func initConsoleLogging() {
|
||||
consoleWriter = zerolog.NewConsoleWriter(func(w *zerolog.ConsoleWriter) {
|
||||
w.TimeFormat = time.StampMilli
|
||||
})
|
||||
@@ -84,8 +86,8 @@ func InitConsoleLogging() {
|
||||
}
|
||||
}
|
||||
|
||||
// InitLogging initializes global logging setup.
|
||||
func InitLogging() {
|
||||
// initLogging initializes global logging setup.
|
||||
func initLogging() {
|
||||
initLoggingWithBackup(true)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user