mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-29 19:18:17 +00:00
log: fix doctests
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
656fedb0c4
commit
6bdd07075d
@ -15,18 +15,28 @@ use crate::{
|
|||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
/// # use proxmox_log::{Logger, LevelFilter};
|
||||||
|
/// # fn func() -> Result<(), anyhow::Error> {
|
||||||
/// // The default PBS daemon/proxy logger
|
/// // The default PBS daemon/proxy logger
|
||||||
/// Logger::from_env("PBS_LOG", LevelFilter::INFO)
|
/// Logger::from_env("PBS_LOG", LevelFilter::INFO)
|
||||||
/// .journald_on_no_workertask()
|
/// .journald_on_no_workertask()
|
||||||
/// .tasklog_pbs()
|
/// .tasklog_pbs()
|
||||||
/// .init()?;
|
/// .init()?;
|
||||||
|
/// # Ok(())
|
||||||
|
/// # }
|
||||||
|
/// # func().expect("failed to init logger");
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
/// # use proxmox_log::{Logger, LevelFilter};
|
||||||
|
/// # fn func() -> Result<(), anyhow::Error> {
|
||||||
/// // The default PBS cli logger
|
/// // The default PBS cli logger
|
||||||
/// Logger::from_env("PBS_LOG", LevelFilter::INFO)
|
/// Logger::from_env("PBS_LOG", LevelFilter::INFO)
|
||||||
/// .stderr()
|
/// .stderr()
|
||||||
/// .init()?;
|
/// .init()?;
|
||||||
|
/// # Ok(())
|
||||||
|
/// # }
|
||||||
|
/// # func().expect("failed to init logger");
|
||||||
/// ```
|
/// ```
|
||||||
pub struct Logger {
|
pub struct Logger {
|
||||||
global_log_level: LevelFilter,
|
global_log_level: LevelFilter,
|
||||||
|
Loading…
Reference in New Issue
Block a user