flxo / rogcat Goto Github PK
View Code? Open in Web Editor NEWA `adb logcat` wrapper
License: MIT License
A `adb logcat` wrapper
License: MIT License
{code}
./target/debug/rogcat -
thread 'thread 'tokio-runtime-worker-0tokio-runtime-worker-1' panicked at '' panicked at 'attempted to leave type internal::Local
uninitialized, which is invalidattempted to leave type internal::Local
uninitialized, which is invalid', ', /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/mem/mod.rs/rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/mem/mod.rs::663663::99
{code}
This is a problem with Crossbeam 0.7.1. Update to 0.7.2 will help.
It's discussed here: darakian/ddh#27
The app will use multiple tags, so it is nice to filter log by process id.
If you quit rogcat.exe (via ctrl c) while it's printing, it leaves the color of the shell text as the last text color that is being printed. Probably works fine in linux.
Hey,
thanks for your project, it's a nice little helper in my daily workflow :-).
Given that there are a few things since the last release to crates.io (from May '19) โ especially exposing the parser in lib โ it would be great if you could cut a new release and make it more accessible like that.
Thanks!
I can't find out in the documentation how to do it.
Following error has been observed :
error: failed to run custom build command for
libudev-sys v0.1.4
Caused by:
process didn't exit successfully:rogcat/target/release/build/libudev-sys-081b531eee85ba8b/build-script-build
(exit status: 101)
The reason is that package libudev-dev needs to be installed.
Command :
sudo apt-get install libudev-dev
Hi. Is rogcat
a wrapper over logcat
binary or is it a port with more features? I want to write a log shipper for android. My service runs inside android and I need a way to read logs. Can rogcat
be used for this purpose?
there is no profiles subcommand anymore
Can rogcat filter based on pid?
The reader::* Stream implementation may block. This should be refactored to use the tokio-io stuff and probably a additional thread that feeds a channel.
The windows FS doesn't allow colons in filenames. Thanks to AntonB for the report.
Sorry if this is by chance really obvious, I know there's rogcat devices to list the available devices.
Is there an option to use the ANDROID_SERIAL to switch between devices, similar to adb -s option?
๐ฅ
cargo install rogcat
I have a workstation where multiple android devices are connected via USB. When running rogcat it get...
() - - waiting for device -
() - error: more than one device/emulator
so basically the same as I would get from adb logcat
. Could you add a command line switch to select the device by the serial number? Similar to adb's -s
switch?
My device is running Android 4.0.3 and it doesn't contain the /dev/log/all file, so I get the following error if I run 'rogcat.exe' over and over
Restarting "C:\Users\abid.esmail\AppData\Local\Android\sdk\platform-tools\adb.exe logcat -b all"
() - Unable to open log device '/dev/log/all': No such file or directory
Restarting "C:\Users\abid.esmail\AppData\Local\Android\sdk\platform-tools\adb.exe logcat -b all"
() - Unable to open log device '/dev/log/all': No such file or directory
shell@android:/dev/log $ ll
crw-rw--w- root log 10, 55 2014-01-31 17:00 events
crw-rw--w- root log 10, 56 2014-01-31 17:00 main
crw-rw--w- root log 10, 54 2014-01-31 17:00 radio
crw-rw--w- root log 10, 53 2014-01-31 17:00 system
Thanks,
Abid
I'm running into trouble loading rogcat profiles (and subsequently using them via -p
flag) on 0.4.5. I have not rolled back to see if this is a regression.
Details below:
$ rogcat --version
rogcat 0.4.5
# Contents of profiiles.toml.
$ cat $HOME/Library/Preferences/rogcat/profiles.toml
[profile.a]
comment = "Messages starting with A or a"
message_ignore_case = ["^A.*"]
[profile.B]
comment = "Messages starting with B"
message = ["^B.*"]
[profile.ABC]
extends = ["A", "B"]
comment = "Profiles A, B plus the following filter (^C.*)"
message = ["^C.*"]
[profile.default]
comment = "Default profile"
# Try to list profiles
$ rogcat profiles --list
error: Found argument '--list' which wasn't expected, or isn't valid in this context
USAGE:
rogcat [FLAGS] [OPTIONS] [COMMAND] [SUBCOMMAND]
For more information try --help
# Try again without --
$ rogcat profiles list
error: Found argument 'list' which wasn't expected, or isn't valid in this context
USAGE:
rogcat [FLAGS] [OPTIONS] [COMMAND] [SUBCOMMAND]
For more information try --help
# Check Env Var
$ echo $ROGCAT_PROFILES
# Set Env Var + Retry
$ ROGCAT_PROFILES=$HOME/Library/Preferences/rogcat/profiles.toml rogcat profiles --list
error: Found argument '--list' which wasn't expected, or isn't valid in this context
USAGE:
rogcat [FLAGS] [OPTIONS] [COMMAND] [SUBCOMMAND]
For more information try --help
$ ROGCAT_PROFILES=$HOME/Library/Preferences/rogcat/profiles.toml rogcat profiles list
error: Found argument 'list' which wasn't expected, or isn't valid in this context
USAGE:
rogcat [FLAGS] [OPTIONS] [COMMAND] [SUBCOMMAND]
For more information try --help
Hi,
Thanks for the tool!
I guess that rogcat profiles --list
subcommand expects an profiles.xml
in the config dir, however in the README you recommend to create a profiles.toml
. Indeed if you create a toml file you will get the following error when issuing rogcat profiles --list
No profiles present in "/home/username/.config/rogcat/profiles.xml"
Maybe you can change the profiles
subcommand such that it parses (only) toml files?
Hi,
After a recent Linux system upgrade I'm getting the following error (from src/terminal.rs:82
) when I execute rogcat
:
Failed to lock terminal
I'm getting the same error even uninstalling and re-installing rogcat
using cargo
.
adb logcat
on the other hand works properly
Some extra info:
Linux x1 4.14.27-1-MANJARO #1 SMP PREEMPT Thu Mar 15 19:47:13 UTC 2018 x86_64 GNU/Linux
cargo 1.26.0-nightly (5f83bb404 2018-03-09)
rustc 1.26.0-nightly (55c984ee5 2018-03-16)
Most close to logcat config would be this configuration:
"%TimeStamp% %ProcessID% %ThreadID% %Process%: %Message%"
Hi! thanks for this, its amazing!
I use this on my laptop but considering that logcat
is built into Android phones and doesnt need adb
it would be great if we could run the commands without adb
prefixed to them.
Reasons?
adb
binaries, let us use them too!I can build this but when issuing "rogcat" I get "cannot find binary path", as stated, I have adb
& fastboot
on my device, so my guess is that rogcat is looking for the binaries only /usr/bin
but Android binaries are in /system/bin
& /system/xbin
.
If you do not oppose to the idea, then my guess is that all it would take is a check (uname
) to get device type and then rogcat would either prefix the commands with adb first or not, or which adb
would locate the binary, or simply allow a variable in rogcats config.yml that would decide instead.
Again, thank you!
rogcat
is unusable for me because the stream stop itself each time. The given reasons is the following: Error: stream did not contain valid UTF-8
if i send sigterm it just continues happily.
rogcat -f html -o log.html
cmd+c to exist rogcat, can not generate log.html file
Great Tool with some awesome features.
Can rogcat parse an existing adb logcat file? We get logcat files from the field and would like to parse them into an easily readable format.
So can it parse a file that is outputted from the command adb logcat -v threadtime > adblogs.txt
If this tool cannot do this, do you have any suggestions of other tools that can do this.
Thanks,
Abid
( ) - error: more than one device/emulator
( ) - - waiting for device -
( ) - error: more than one device/emulator
( ) - - waiting for device -
....
^ That's what I get when I start rogcat and have two androids with USB debugging enabled
Edit: I installed through brew
and have version 0.2.15
After experimenting a bit:
First variant doesn't work (7:21:49), second does (07:21:49). Both seem to be valid timestamps.
โ echo "2021-09-24 7:21:49.410 4249 140276332086464 D Test: test" | rogcat -
() - 2021-09-24 7:21:49.410 4249 140276332086464 D Test: test
โ echo "2021-09-24 07:21:49.410 4249 140276332086464 D Test: test" | rogcat -
07:21:49.410 Test (4249 140276332086464) D test
Hi,
there is a issue if i wahnt to read a stored file into rogcat. The issue is on different locations, also it is no effect if I try to import a logcat log or a before stored rogcat log. I get always the message:
Failed to open rogcat.log:
blocking
annotated I/O must be called from the context of the Tokio runtime.
No effect are also if I use the complete pathname or run it from the directory, where the file is located.
Version is: 0.4.3
Issue is not in 0.4.1 existing
I build the project on Ubuntu 18.04. I installed Rust by running
curl https://sh.rustup.rs -sSf | sh
then run
RUST_BACKTRACE=1 cargo install --path .
I get this error
Installing rogcat v0.3.1-alpha.0 (/home/gqqnbig/Project/rogcat)
Compiling libudev-sys v0.1.4
Compiling tokio-current-thread v0.1.4
Compiling idna v0.1.5
Compiling parking_lot_core v0.3.1
Compiling rand_chacha v0.1.0
Compiling rand_pcg v0.1.1
Compiling rand v0.6.1
Compiling rand v0.5.5
error: failed to run custom build command for `libudev-sys v0.1.4`
process didn't exit successfully: `/home/gqqnbig/Project/rogcat/target/release/build/libudev-sys-364e8e627474c66d/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Failed to run `\"pkg-config\" \"--libs\" \"--cflags\" \"libudev\"`: No such file or directory (os error 2)"', src/libcore/result.rs:997:5
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:70
2: std::panicking::default_hook::{{closure}}
at src/libstd/sys_common/backtrace.rs:58
at src/libstd/panicking.rs:200
3: std::panicking::default_hook
at src/libstd/panicking.rs:215
4: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:478
5: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:385
6: rust_begin_unwind
at src/libstd/panicking.rs:312
7: core::panicking::panic_fmt
at src/libcore/panicking.rs:85
8: core::result::unwrap_failed
9: build_script_build::main
10: std::rt::lang_start::{{closure}}
11: std::panicking::try::do_call
at src/libstd/rt.rs:49
at src/libstd/panicking.rs:297
12: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:87
13: std::rt::lang_start_internal
at src/libstd/panicking.rs:276
at src/libstd/panic.rs:388
at src/libstd/rt.rs:48
14: main
15: __libc_start_main
16: _start
warning: build failed, waiting for other jobs to finish...
error: failed to compile `rogcat v0.3.1-alpha.0 (/home/gqqnbig/Project/rogcat)`, intermediate artifacts can be found at `/home/gqqnbig/Project/rogcat/target`
Caused by:
build failed
How do I build it properly?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.