pub fn check_parser_error(self) -> Result<Logger, FlexiLoggerError> {
        match self.parse_errs {
            Some(parse_errs) => Err(FlexiLoggerError::Parse(parse_errs, self.spec)),
            None => Ok(self),
        }
    }
/// Allows verifying that no parsing errors have occured in the used factory method,
/// and examining the parse error.
///
/// Most of the factory methods for Logger (`Logger::with_...()`)
/// parse a log specification String, and deduce from it a `LogSpecification` object.
/// If parsing fails, errors are reported to stdout, but effectively ignored.
/// In worst case, nothing is logged!
///
/// This method gives programmatic access to parse errors, if there were any, so that errors
/// don't happen unnoticed.
///
/// In the following example we just panic if the spec was not free of errors:
///
/// ```should_panic
/// # use flexi_logger::{Logger,LogTarget};
/// Logger::with_str("hello world")
/// .check_parser_error()
/// .unwrap()       // <-- here we could do better than panic
/// .log_target(LogTarget::File)
/// .start();
/// ```
Allows verifying that no parsing errors have occured in the used factory method,
and examining the parse error.

Most of the factory methods for Logger (`Logger::with_...()`)
parse a log specification String, and deduce from it a `LogSpecification` object.
If parsing fails, errors are reported to stdout, but effectively ignored.
In worst case, nothing is logged!

This method gives programmatic access to parse errors, if there were any, so that errors
don't happen unnoticed.

In the following example we just panic if the spec was not free of errors.


Allows verifying that no parsing errors have occured in the used factory method and examining the parse error . Most of the factory methods for Logger ( ` Logger :: with_ ... () ` ) parse a log specification String and deduce from it a ` LogSpecification ` object . If parsing fails errors are reported to stdout but effectively ignored . In worst case nothing is logged! This method gives programmatic access to parse errors if there were any so that errors don ' t happen unnoticed . In the following example we just panic if the spec was not free of errors .
pub fn check_parser_error(self) -> Result<Logger, FlexiLoggerError> {
        match self.parse_errs {
            Some(parse_errs) => Err(FlexiLoggerError::Parse(parse_errs, self.spec)),
            None => Ok(self),
        }
    }
pub fn check_parser_error ( self ) -> Result < Logger , FlexiLoggerError > { match self . parse_errs { Some ( parse_errs ) => Err ( FlexiLoggerError :: Parse ( parse_errs , self . spec ) ) , None => Ok ( self ) , } }
Allows verifying that no parsing errors have occured in the used factory method,
and examining the parse error.
Allows verifying that no parsing errors have occured in the used factory method and examining the parse error .
self
self
use flexi_logger::{logger,logtarget};
:with_str("hello world")
.check_parser_error()
.unwrap()       // <-- here we could do better than panic
.log_target(LogTarget::File)
.start();
```
: with_str ( " hello world " ) . check_parser_error () . unwrap () // < -- here we could do better than panic . log_target ( LogTarget :: File ) . start () ; ` ` `