#I don't get logs when running application on Android

6 messages · Page 1 of 1 (latest)

jolly solar
#

I'm testing my Tauri application on a real Android device, which launches fine. But at some point I need to get debug outputs in the terminal/logcat.
So I've followed steps setup and usage 1 and 2 on page https://v2.tauri.app/plugin/logging/#printing-logs-to-the-terminal, which set up logging requirements and the default logging permission.

So in my fronted file, I'm using info command

import { info } from "@tauri-apps/plugin-log";
...
info(`release at (${file}, ${rank})`);

But no output is printed, neither in the terminal, nor in the logcat.

So could I have missed an important step ?

Tauri

Configurable logging.

jolly solar
#

Finally solved

in lib.rs I changed the plugin invocation

        .plugin(
            tauri_plugin_log::Builder::new()
                .target(Target::new(TargetKind::Webview))
                .build()
        )

In main.tsx I added

import { attachConsole } from "@tauri-apps/plugin-log";

await attachConsole();

And went to chrome://inspect inside chrome (letting me selecting the device and view console)

#

BTW: how can change the tag from unsolved to solved ?

tawny canopy