Fix logging the file name on windows
This commit is contained in:
parent
7bca6e55cf
commit
526aaffec3
|
@ -202,7 +202,7 @@ impl Console {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn log(&mut self, record: &log::LogRecord) {
|
fn log(&mut self, record: &log::LogRecord) {
|
||||||
let mut file = record.location().file();
|
let mut file = &record.location().file().replace("\\", "/")[..];
|
||||||
if let Some(pos) = file.rfind("src/") {
|
if let Some(pos) = file.rfind("src/") {
|
||||||
file = &file[pos + 4..];
|
file = &file[pos + 4..];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue