mirror of
https://github.com/OMGeeky/confique.git
synced 2026-02-23 15:38:30 +01:00
Add version from other project
This was mostly what I implemented as utility library for another project. But I figured I can also extract it as it's useful on its own.
This commit is contained in:
22
examples/simple.rs
Normal file
22
examples/simple.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
mod config {
|
||||
use std::path::PathBuf;
|
||||
|
||||
confique::config! {
|
||||
log: {
|
||||
/// Determines how many messages are logged. Log messages below
|
||||
/// this level are not emitted. Possible values: "trace", "debug",
|
||||
/// "info", "warn", "error" and "off".
|
||||
level: log::LevelFilter = "debug",
|
||||
|
||||
/// If this is set, log messages are also written to this file.
|
||||
#[example = "/var/log/tobira.log"]
|
||||
file: Option<PathBuf>,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fn main() {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user