modified: src/simple_log.rs
Some checks failed
gitea/Frida-android-native/pipeline/head There was a failure building this commit
Some checks failed
gitea/Frida-android-native/pipeline/head There was a failure building this commit
This commit is contained in:
parent
cc559ad894
commit
66028e684d
@ -1,6 +1,8 @@
|
||||
use crossbeam_channel::unbounded;
|
||||
use crossbeam_channel::{ Sender, Receiver };
|
||||
use std::sync::LazyLock;
|
||||
use robusta_jni::jni::JNIEnv;
|
||||
use crate::jni::FridaLib;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Default)]
|
||||
pub struct SimpleLogger {
|
||||
@ -25,6 +27,10 @@ impl log::Log for SimpleLogger {
|
||||
}
|
||||
|
||||
impl SimpleLogger {
|
||||
pub fn new() -> Self {
|
||||
SimpleLogger{env: None}
|
||||
}
|
||||
|
||||
fn do_log(&self, record: &log::Record) {
|
||||
let timestamp: chrono::DateTime<chrono::Local> = chrono::Local::now();
|
||||
let msg = format!(
|
||||
@ -37,7 +43,7 @@ impl SimpleLogger {
|
||||
FridaLib::traceFromNative(self.env, msg);
|
||||
}
|
||||
|
||||
fn set_env(&self, env: &JNIEnv) {
|
||||
pub fn set_env(&self, env: &JNIEnv) {
|
||||
self.env = Some(env);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user