//! The second one, client-side by implementing check against Record Level field.
//! Each module may have its own Logger or share one.
-use std::cmp;
-use std::fmt;
+use core::cmp;
+use core::fmt;
static LOG_LEVEL_NAMES: [&'static str; 6] = ["OFF", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"];
/// A Record, unit of logging output with Metadata to enable filtering
/// Module_path, file, line to inform on log's source
+/// (C-not exported) - we convert to a const char* instead
#[derive(Clone,Debug)]
pub struct Record<'a> {
/// The verbosity level of the message.
impl<'a> Record<'a> {
/// Returns a new Record.
+ /// (C-not exported) as fmt can't be used in C
#[inline]
pub fn new(level: Level, args: fmt::Arguments<'a>, module_path: &'a str, file: &'a str, line: u32) -> Record<'a> {
Record {
}
/// A trait encapsulating the operations required of a logger
-pub trait Logger: Sync + Send {
+pub trait Logger {
/// Logs the `Record`
fn log(&self, record: &Record);
}