mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44: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
|
// Init initialises the logger based on a logging configuration
|
||||||
func Init(logFile string, logOut bool, logLevel string) {
|
func Init(logFile string, logOut bool, logLevel string) {
|
||||||
var file *os.File
|
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 != "" {
|
if logFile != "" {
|
||||||
var err error
|
var err error
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
### 🎨 Improvements
|
### 🎨 Improvements
|
||||||
|
* Make logging format consistent across platforms and include full timestamp.
|
||||||
* Remember gallery images view mode.
|
* Remember gallery images view mode.
|
||||||
* Add option to skip checking of insecure SSL certificates when scraping.
|
* Add option to skip checking of insecure SSL certificates when scraping.
|
||||||
* Auto-play video previews on mobile devices.
|
* Auto-play video previews on mobile devices.
|
||||||
|
|||||||
Reference in New Issue
Block a user