Skip to content

Commit fef3b05

Browse files
avoid unnecessary logging
1 parent 55913fa commit fef3b05

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,11 @@ initialize_plugin!(
1919
let samp_logger = samp::plugin::logger()
2020
.level(log::LevelFilter::Info);
2121

22-
let log_file = fern::log_file("SampBcrypt.log").expect("Cannot create log file!");
23-
24-
let trace_level = fern::Dispatch::new()
25-
.level(log::LevelFilter::Trace)
26-
.chain(log_file);
27-
2822
let _ = fern::Dispatch::new()
2923
.format(|callback, message, record| {
3024
callback.finish(format_args!("[SampBcrypt] [{}]: {}", record.level().to_string().to_lowercase(), message))
3125
})
3226
.chain(samp_logger)
33-
.chain(trace_level)
3427
.apply();
3528

3629
SampBcrypt {

src/plugin.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use log::info;
21
use samp::plugin::SampPlugin;
32
use std::collections::LinkedList;
43
use std::sync::{Arc, Mutex};
@@ -9,22 +8,4 @@ pub struct SampBcrypt {
98
pub pool: ThreadPool,
109
}
1110

12-
impl SampPlugin for SampBcrypt {
13-
fn on_load(&mut self) {
14-
info!(
15-
"
16-
###############################################################
17-
# SampBcrypt #
18-
# V0.2.0 Loaded!! #
19-
# Found any bugs? Report it here: #
20-
# https://github.com/Sreyas-Sreelal/samp-bcrypt/issues #
21-
# #
22-
###############################################################
23-
"
24-
);
25-
}
26-
27-
fn on_unload(self: Box<SampBcrypt>) {
28-
info!("Unloaded!");
29-
}
30-
}
11+
impl SampPlugin for SampBcrypt {}

0 commit comments

Comments
 (0)