Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
fix: update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryburov committed Mar 3, 2023
1 parent 83336e5 commit e377705
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pkg/database/mysql/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ type client struct {

// NewMysqlClient init client for mysql database
func NewMysqlClient(host, username, password, base string) (*client, error) {

db, err := sqlx.Connect("mysql", fmt.Sprintf("%s:%s@(%s)/%s", username, password, host, base))
if err != nil {
return nil, err
}

if err := db.Ping(); err != nil {
if err = db.Ping(); err != nil {
return nil, err
}

Expand Down
3 changes: 1 addition & 2 deletions pkg/logger/zap/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func (l *client) InitLogger() {
encoderCfg.EncodeTime = zapcore.ISO8601TimeEncoder

// write syncers
//stdoutSyncer := zapcore.Lock(os.Stdout)
stderrSyncer := zapcore.Lock(os.Stderr)

l.logger = zap.New(
Expand All @@ -46,7 +45,7 @@ func (l *client) InitLogger() {
zap.NewAtomicLevelAt(logLevel)),
zap.AddCaller(),
zap.AddStacktrace(zapcore.LevelOf(zap.ErrorLevel)),
zap.AddCallerSkip(2)).
zap.AddCallerSkip(1)).
Sugar()

if err := l.logger.Sync(); err != nil && !errors.Is(err, syscall.ENOTTY) {
Expand Down

0 comments on commit e377705

Please sign in to comment.