cmd: allow import/running ctrld as library

This commit is contained in:
Ginder Singh
2023-09-18 11:40:03 +00:00
committed by Cuong Manh Le
parent 2765487f10
commit 507c1afd59
8 changed files with 379 additions and 219 deletions
+3 -3
View File
@@ -65,7 +65,7 @@ func normalizeLogFilePath(logFilePath string) string {
return filepath.Join(dir, logFilePath)
}
func initConsoleLogging() {
func InitConsoleLogging() {
consoleWriter = zerolog.NewConsoleWriter(func(w *zerolog.ConsoleWriter) {
w.TimeFormat = time.StampMilli
})
@@ -84,8 +84,8 @@ func initConsoleLogging() {
}
}
// initLogging initializes global logging setup.
func initLogging() {
// InitLogging initializes global logging setup.
func InitLogging() {
initLoggingWithBackup(true)
}