MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / logs

Method logs

packages/server/src/android.rs:658–684  ·  view source on GitHub ↗
(&self, id: &str, limit: usize)

Source from the content-addressed store, hash-verified

656 }
657
658 pub fn logs(&self, id: &str, limit: usize) -> Result<Vec<Value>, AppError> {
659 let serial = self.serial_for_id(id)?;
660 let raw = self.run_adb([
661 "-s",
662 &serial,
663 "logcat",
664 "-d",
665 "-v",
666 "threadtime",
667 "-t",
668 &limit.max(1).to_string(),
669 ])?;
670 Ok(raw
671 .lines()
672 .map(|line| {
673 json!({
674 "timestamp": "",
675 "level": android_log_level(line),
676 "process": "",
677 "pid": Value::Null,
678 "subsystem": "android",
679 "category": "logcat",
680 "message": line,
681 })
682 })
683 .collect())
684 }
685
686 pub fn chrome_profile(&self, id: &str) -> Result<Value, AppError> {
687 let serial = self.serial_for_id(id)?;

Callers 2

simulator_logsFunction · 0.80
runJsSurfaceFunction · 0.80

Calls 3

serial_for_idMethod · 0.80
run_adbMethod · 0.80
maxMethod · 0.80

Tested by

no test coverage detected