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

reopen access/error logs on sighup #51

Merged
merged 3 commits into from
Dec 1, 2016
Merged

reopen access/error logs on sighup #51

merged 3 commits into from
Dec 1, 2016

Conversation

kazegusuri
Copy link
Contributor

}
}
}
}()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks too deep nest to me.

@kazegusuri
Copy link
Contributor Author

@cubicdaiya refactored signal handler to avoid deep nest.

}

return zap.New(encoder, level, zap.Output(writer), zap.ErrorOutput(writer)), nil
writeSyncer := zap.AddSync(writer)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is zap.AddSync added?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zap.Output requires zap.WriteSyncer. io.Writer needs to use zap.AddSyncer to implement zap.WriteSyncer.

@cubicdaiya cubicdaiya added the LGTM label Dec 1, 2016
@cubicdaiya cubicdaiya merged commit bd2fb7c into master Dec 1, 2016
@cubicdaiya cubicdaiya deleted the log-reopen branch August 20, 2017 04:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants