Messaging service, adapters, refactoring
This commit is contained in:
@@ -13,6 +13,8 @@ import (
|
||||
"git.derfenix.pro/fenix/astontest/internal/application"
|
||||
)
|
||||
|
||||
var version = "dev"
|
||||
|
||||
func main() {
|
||||
ctx, cancel := signal.NotifyContext(context.Background(), os.Kill, os.Interrupt)
|
||||
defer cancel()
|
||||
@@ -27,6 +29,8 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
log.Sugar().Infof("Start service version %s", version)
|
||||
|
||||
app, err := application.NewApplication(&cfg, log)
|
||||
if err != nil {
|
||||
log.Error("new application", zap.Error(err))
|
||||
@@ -42,6 +46,8 @@ func main() {
|
||||
func getLogger(cfg application.Config) (*zap.Logger, error) {
|
||||
logCfg := zap.NewProductionConfig()
|
||||
logCfg.EncoderConfig.EncodeTime = zapcore.RFC3339TimeEncoder
|
||||
logCfg.DisableCaller = true
|
||||
|
||||
if cfg.Debug {
|
||||
logCfg.DisableStacktrace = false
|
||||
logCfg.Level = zap.NewAtomicLevelAt(zapcore.DebugLevel)
|
||||
|
||||
Reference in New Issue
Block a user