Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

lib.rs 802 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
  1. #[macro_use]
  2. extern crate log;
  3. #[macro_use] extern crate derive_more;
  4. extern crate structopt;
  5. extern crate quick_xml;
  6. extern crate postgres;
  7. extern crate ntriple;
  8. extern crate zip;
  9. extern crate os_pipe;
  10. extern crate crossbeam_channel;
  11. mod error;
  12. pub mod cleaning;
  13. pub mod tsv;
  14. pub mod db;
  15. pub use error::BDError;
  16. pub use error::Result;
  17. pub use error::err;
  18. use structopt::StructOpt;
  19. #[derive(StructOpt, Debug)]
  20. pub struct LogOpts {
  21. /// Verbose mode (-v, -vv, -vvv, etc.)
  22. #[structopt(short="v", long="verbose", parse(from_occurrences))]
  23. verbose: usize,
  24. /// Silence output
  25. #[structopt(short="q", long="quiet")]
  26. quiet: bool
  27. }
  28. impl LogOpts {
  29. /// Initialize logging
  30. pub fn init(&self) -> Result<()> {
  31. Ok(stderrlog::new().verbosity(self.verbose + 2).quiet(self.quiet).init()?)
  32. }
  33. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...