Turned this into a basic and simple logging system for now.
Currently the library will handle using the log macros to directly call println!(). Later this can be set to actually log the errors.
This commit is contained in:
30
src/lib.rs
30
src/lib.rs
@ -5,34 +5,8 @@
|
||||
|
||||
// Define the modules that are a
|
||||
// part of this library.
|
||||
mod log_level;
|
||||
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