Using the Path in the log block to hopefully make using the library easier.

This commit is contained in:
Jason Travis Smith 2016-01-28 13:49:22 -05:00
parent 200be2c0db
commit c15daad3b1

View File

@ -4,11 +4,14 @@ macro_rules! log
{ {
($log_level: expr, $($arg: tt)+) => ($log_level: expr, $($arg: tt)+) =>
({ ({
let file_path: &std::path::Path; // Specifically use the Path from std in this block.
use std::path::Path;
let file_path: &Path;
let mut file_name: &str; let mut file_name: &str;
file_name = file!(); file_name = file!();
file_path = std::path::Path::new(file!()); file_path = Path::new(file!());
match file_path.file_name() match file_path.file_name()
{ {
Some(name) => Some(name) =>