We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I found it is impossible to merge more than one configString like this (last config string will override previous one):
const defaultConfig = ` { formatter.name = "text" formatter.options { force-colors = false full-timestamp = false timestamp-format = "01/02 15:04:05.000" } } ` opts := make([]logrus_mate.Option, 0) opts = append(opts, logrus_mate.ConfigString(defaultConfig)) if (someCondition){ opts = append(opts, logrus_mate.ConfigString(fmt.Sprintf(`{ level = "%s" }`, myLevel))) } if (anotherCondition){ opts = append(opts, logrus_mate.ConfigString(`hook { file { filename = "my.log" } }`) } logrus_mate.Hijack(logrus.StandardLogger(),opts...)
so, is there any approach to set up configuration (in struct or sth else) directly rather than using string or a file?
The text was updated successfully, but these errors were encountered:
You can implement a configProvider https://github.com/gogap/config/blob/master/providers.go 😃
https://github.com/gogap/config/blob/master/providers.go
Sorry, something went wrong.
got it, THX
No branches or pull requests
I found it is impossible to merge more than one configString like this (last config string will override previous one):
so, is there any approach to set up configuration (in struct or sth else) directly rather than using string or a file?
The text was updated successfully, but these errors were encountered: