tauri-apps / tauri-apps/plugins-workspace

How can I log anything runnint tauri-loggin-plugin with android

Open
#2,160 1 comment 0 reactions 0 assignees View on GitHub
plugin: log type: question
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

I have tried multiple ways of trying to login greeting message from tauri on the rust side, but nothing works. So the app is compiling, however no logs, I see greeting message in the android emulator, but no logs.
Here is the app and plugin config:
```rs
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
use tauri::{
image::Image,
AppHandle, Manager, State, Emitter
};
use log::{LevelFilter, info, warn, debug, error};
use chrono::Utc;
use tauri_plugin_log::{Target, TargetKind, Builder};

#[tauri::command]
fn greet(name: &str) -> String {
info!("Starting websocket v333.........");
warn!("Starting websocket v333.........");
error!("Starting websocket v333.........");
debug!("Starting websocket v333.........");

format!("Hello, {}! You've been greeted from Rust!", name)
}

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_shell::init())
.plugin(
tauri_plugin_log::Builder::default().build()
)
.invoke_handler(tauri::generate_handler![greet])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```
It is really super heavy to find something relevant.
I tried multiple plugin versions, from 2.0.0 to 2.0.3, nothing works.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.