Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Commit missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Apr 22, 2022
1 parent 04605a2 commit 4860ee5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/parquet_read_parallel/src/logger.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use log::{Metadata, Record};

pub struct SimpleLogger;

impl log::Log for SimpleLogger {
fn enabled(&self, _: &Metadata) -> bool {
true
}

fn log(&self, record: &Record) {
if self.enabled(record.metadata()) {
let now = chrono::offset::Utc::now();
println!("{} - {} - {}", now, record.level(), record.args());
}
}

fn flush(&self) {}
}

pub static LOGGER: SimpleLogger = SimpleLogger;

0 comments on commit 4860ee5

Please sign in to comment.