Skip to content

Commit

Permalink
fix(android): buggy logging fn
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed Jan 25, 2024
1 parent 0396cf1 commit a95f2b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rsapi-jni/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ impl log::Log for AndroidLogger {
log::Level::Debug => LogPriority::DEBUG,
log::Level::Trace => LogPriority::VERBOSE,
};
let message = format!("{}\0", record.args());
// NOTE: Android logcat doesn't support %, so we replace it with _
let message = format!("{}\0", record.args()).replace("%", "_");
let tag = b"rsapi-jni\0";
unsafe {
__android_log_print(
Expand Down

0 comments on commit a95f2b7

Please sign in to comment.