File: main.ansi

package info (click to toggle)
golang-github-mgutz-logxi 1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 524 kB
  • sloc: makefile: 7
file content (17 lines) | stat: -rw-r--r-- 2,130 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import  "github.com/mgutz/logxi/v1"

func loadConfig() {
	logger.Error("Could not read config file", "err", errConfig)
}

func main() {
	// create loggers
	log.Trace("creating loggers")
	logger = log.New("server")
	modelsLogger := log.New("models")

	logger.Debug("Process", "hostname", hostname, "pid", os.Getpid())
	modelsLogger.Info("Connecting to database...")
	modelsLogger.Warn("Could not connect, retrying ...", "dsn", dsn)
	loadConfig()
}