show timestamp for logger
This commit is contained in:
parent
64b40c3d82
commit
e29bc93f35
|
@ -3,6 +3,7 @@ package config
|
||||||
import (
|
import (
|
||||||
"math"
|
"math"
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
|
|
||||||
"git.burning.moe/celediel/burning.moe/internal/models"
|
"git.burning.moe/celediel/burning.moe/internal/models"
|
||||||
"github.com/charmbracelet/log"
|
"github.com/charmbracelet/log"
|
||||||
|
@ -35,7 +36,10 @@ type ConfigDatabase struct {
|
||||||
// Initialises the app wide AppConfig, loads values from environment, and set up the Logger
|
// Initialises the app wide AppConfig, loads values from environment, and set up the Logger
|
||||||
func Initialise() AppConfig {
|
func Initialise() AppConfig {
|
||||||
app := *defaults
|
app := *defaults
|
||||||
app.Logger = log.New(os.Stderr)
|
app.Logger = log.NewWithOptions(os.Stderr, log.Options{
|
||||||
|
ReportTimestamp: true,
|
||||||
|
TimeFormat: time.TimeOnly,
|
||||||
|
})
|
||||||
|
|
||||||
// load values from config
|
// load values from config
|
||||||
if cfg, err := loadConfig(); err == nil {
|
if cfg, err := loadConfig(); err == nil {
|
||||||
|
|
Loading…
Reference in a new issue