Skip to content

Commit

Permalink
🦄 refactor: Replace debug_print with log
Browse files Browse the repository at this point in the history
  • Loading branch information
caoccao committed Jul 1, 2024
1 parent dcd5a42 commit b6353f8
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 12 deletions.
1 change: 1 addition & 0 deletions docs/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Upgraded deno_ast to v0.39.2
* Upgraded rust toolchain to v1.79.0
* Replaced `debug_print` with `log`

## 0.9.0

Expand Down
109 changes: 100 additions & 9 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ crate_type = ["cdylib", "rlib"]

[dependencies]
base64 = "0.22.1"
debug_print = "1.0.0"
log = "0.4.22"
env_logger = "0.11.3"
deno_ast = { version = "0.39.0", features = [
"bundler",
"cjs",
Expand Down
4 changes: 2 additions & 2 deletions rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use jni::sys::{jint, jobject, jstring, JNI_VERSION_1_8};
use jni::{JNIEnv, JavaVM};
use jni_utils::FromJava;

use debug_print::debug_println;
use std::ffi::c_void;
use std::ptr::null_mut;

Expand All @@ -40,7 +39,8 @@ use crate::jni_utils::{jstring_to_optional_string, jstring_to_string, string_to_

#[no_mangle]
pub extern "system" fn JNI_OnLoad<'local>(java_vm: JavaVM, _: c_void) -> jint {
debug_println!("JNI_OnLoad()");
env_logger::init();
log::debug!("JNI_OnLoad()");
let mut env = java_vm.get_env().expect("Cannot get JNI env");
ast_utils::init(&mut env);
comment_utils::init(&mut env);
Expand Down

0 comments on commit b6353f8

Please sign in to comment.