A simple start at a logging facility.
This commit is contained in:
38
src/lib.rs
Normal file
38
src/lib.rs
Normal file
@ -0,0 +1,38 @@
|
||||
///
|
||||
///
|
||||
///
|
||||
|
||||
|
||||
// Define the modules that are a
|
||||
// part of this library.
|
||||
mod macros;
|
||||
pub mod library_info;
|
||||
pub mod log_level;
|
||||
pub mod location;
|
||||
pub mod entry;
|
||||
pub mod logger;
|
||||
|
||||
// Pull certain module items to the
|
||||
// fore front of the crate.
|
||||
pub use self::logger::Logger;
|
||||
pub use self::log_level::LogLevel;
|
||||
|
||||
|
||||
// Define the Macros this library provides and uses.
|
||||
#[macro_export]
|
||||
macro_rules! write_to_log
|
||||
{
|
||||
() =>
|
||||
{
|
||||
println!("{2:?} {0:?} {1:?}", file!(), line!(), module_path!());
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! message
|
||||
{
|
||||
() =>
|
||||
{
|
||||
write_to_log!();
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user