[−][src]Struct logosaurus::Logger
Represents a logging object that writes to a specified output. It can be used simultaneously from multiple threads; it guarantees to serialize writes.
Use LoggerBuilder
to construct a Logger
, or use Logger::default()
.
Implementations
impl<W: Write + Send> Logger<W>
[src]
pub fn builder(w: W) -> LoggerBuilder<W>
[src]
Returns a LoggerBuilder
that can be used to build a Logger
.
pub fn write_output(
&self,
level: Level,
target: &str,
file: Option<&str>,
line: Option<u32>,
s: &str
)
[src]
&self,
level: Level,
target: &str,
file: Option<&str>,
line: Option<u32>,
s: &str
)
Writes the given string s
using the logger. Typically, you would not use this directly
but instead use the macros provided by the log
crate.
Trait Implementations
impl Default for Logger<Stderr>
[src]
fn default() -> Logger<Stderr>
[src]
Returns a default Logger
.
A default Logger
has
- level:
log::LevelFilter::Trace
, - out: stderr,
- flags:
L_STD
, and - prefix:
""
(empty string)
impl<W: Write + Send> Log for Logger<W>
[src]
Auto Trait Implementations
impl<W> RefUnwindSafe for Logger<W>
impl<W> Send for Logger<W>
impl<W> Sync for Logger<W>
impl<W> Unpin for Logger<W>
impl<W> UnwindSafe for Logger<W>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,