Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: the config.Writer should be used in preference in elog Build #306

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

laojianzi
Copy link
Contributor

@laojianzi laojianzi commented Sep 23, 2022

defaultConfig() has been read Writer from env

Writer: eapp.EgoLogWriter(),

so we should give preference to config.Writer


if eapp.EgoLogWriter() == "stderr" {
c.config.fields = append(c.config.fields, FieldLogName(c.config.Name))
}

If we don't set env but do set config, the Writer here will be ignored

@askuy askuy merged commit 58a29d2 into gotomicro:master Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants