mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
Use logger from logging pkg
This now also uses info as the default log level and enables the configuration of the default log level as well as log levels of the child loggers that will be implemented in a later commit.
This commit is contained in:
parent
414057830e
commit
d3cdc8023b
1 changed files with 9 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"context"
|
||||
"github.com/icinga/icingadb/internal/command"
|
||||
"github.com/icinga/icingadb/internal/logging"
|
||||
"github.com/icinga/icingadb/pkg/com"
|
||||
"github.com/icinga/icingadb/pkg/common"
|
||||
"github.com/icinga/icingadb/pkg/contracts"
|
||||
|
|
@ -34,8 +35,15 @@ func main() {
|
|||
|
||||
func run() int {
|
||||
cmd := command.New()
|
||||
logs, err := logging.NewLogging(
|
||||
cmd.Config.Logging.Level,
|
||||
cmd.Config.Logging.Options,
|
||||
)
|
||||
if err != nil {
|
||||
utils.Fatal(errors.Wrap(err, "can't configure logging"))
|
||||
}
|
||||
|
||||
logger := cmd.Logger
|
||||
logger := logs.GetLogger()
|
||||
defer logger.Sync()
|
||||
|
||||
logger.Info("Starting Icinga DB")
|
||||
|
|
|
|||
Loading…
Reference in a new issue