mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Add full timestamp for console/file logging (#1130)
This commit is contained in:
@@ -29,6 +29,11 @@ var logBuffer []LogItem
|
||||
// Init initialises the logger based on a logging configuration
|
||||
func Init(logFile string, logOut bool, logLevel string) {
|
||||
var file *os.File
|
||||
customFormatter := new(logrus.TextFormatter)
|
||||
customFormatter.TimestampFormat = "2006-01-02 15:04:05"
|
||||
customFormatter.ForceColors = true
|
||||
customFormatter.FullTimestamp = true
|
||||
logger.SetFormatter(customFormatter)
|
||||
|
||||
if logFile != "" {
|
||||
var err error
|
||||
|
||||
Reference in New Issue
Block a user