-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Configuration file directly in the crate #70
Comments
You can deserialize the string into a |
But to be honest, I don't see how to build the RawConfig. I saw in init_file that rawConfig is built like this : let config = format.parse(&source)?; But Format type is private. I don't see how I can build that RawConfig object. Sorry if it is a dumb question and thanks for your help. |
RawConfig implements Deserialize (it unfortunately doesn't show up in rustdoc), so you'd just do |
Ah, awesome, thanks a lot for your help !!! |
It would be nice if we could init log4rs with a file in the crate.
It exists "std::include_str!" to get the content of a file then log4rs could read it. I know that it is possible to configure it by code by building the config ourself, but would be useful to just add a yaml file to my crate and init log4rs with it.
Does it make sense ?
Thanks
The text was updated successfully, but these errors were encountered: