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

Config File Restrictions #46

Closed
jolhoeft opened this issue May 4, 2017 · 1 comment
Closed

Config File Restrictions #46

jolhoeft opened this issue May 4, 2017 · 1 comment

Comments

@jolhoeft
Copy link

jolhoeft commented May 4, 2017

For my application, I need a small amount of config information. Not wanting to have multiple config files, I just added a field to my 0.5.x Log4rs config file containing my config information, which worked fine. I just upgraded to 0.7.x, and Log4rs can no longer parse the config file. This problem appears to be Serde deserializing into Log4rs' RawConfig struct, seeing an unexpected field (my config data), and returning an error. I'm using the toml format.

Do I have any options except splitting this into two config files?

@sfackler
Copy link
Collaborator

sfackler commented May 5, 2017

I should work just fine embedded in a larger config structure:

#[derive(Deserialize)]
pub struct Config {
   pub logging: log4rs::file::RawConfig,
   pub other_thing: u32
}

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

No branches or pull requests

2 participants