All Projects → ujiro99 → logcatf

ujiro99 / logcatf

Licence: Apache-2.0 license
A Command line tool for format Android Logcat.

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to logcatf

logcat-colorize
Command that takes adb logcat from stdin and produces formatted colorized to stdout, written in C++.
Stars: ✭ 21 (+23.53%)
Mutual labels:  adb, logcat
Droid-Explorer
Cross-platform root file explorer for Android phones.
Stars: ✭ 34 (+100%)
Mutual labels:  adb
homebridge-adb
Homebridge script to control remote ADB enabled Android device
Stars: ✭ 56 (+229.41%)
Mutual labels:  adb
TLog
Android日志工具
Stars: ✭ 16 (-5.88%)
Mutual labels:  logcat
MyLogLibrary
🚧 - Simple Android Kotlin logger (2017/2020)
Stars: ✭ 31 (+82.35%)
Mutual labels:  logcat
answer ai
go实现西瓜视频,花椒直播,冲顶大会,芝士超人等平台智能答题。
Stars: ✭ 65 (+282.35%)
Mutual labels:  adb
toster
DSL framework for testing Android apps
Stars: ✭ 31 (+82.35%)
Mutual labels:  adb
openstf-arm7-docker
Smartphone Test Farm using Docker on Raspberry Pi
Stars: ✭ 19 (+11.76%)
Mutual labels:  adb
ethernally
Your scrcpy companion for Android wireless screen mirroring
Stars: ✭ 33 (+94.12%)
Mutual labels:  adb
Ghost
Ghost Framework is an Android post-exploitation framework that exploits the Android Debug Bridge to remotely access an Android device.
Stars: ✭ 1,934 (+11276.47%)
Mutual labels:  adb
web-adb
A simple webapp and API for managing and manipulating connected Android devices via the Android Device Bridge (ABD)
Stars: ✭ 96 (+464.71%)
Mutual labels:  adb
adbd
Android Debug Bridge daemon implementation in RT-Thread
Stars: ✭ 37 (+117.65%)
Mutual labels:  adb
ATA-GUI
ATA GUI is a project to make ATA available to all the users. ATA GUI is an Advance Tool for Android™ powered by SDK Platform Tools.
Stars: ✭ 40 (+135.29%)
Mutual labels:  adb
PlexMeetsHomeAssistant
Custom card which integrates plex into Home Assistant and makes it possible to launch movies or tv shows on TV with a simple click
Stars: ✭ 73 (+329.41%)
Mutual labels:  adb
adb-interface-vscode
🔌 A tool that allows you to execute ADB.exe commands/actions without having to interact with the terminal.
Stars: ✭ 26 (+52.94%)
Mutual labels:  adb
LogDelegate
Simple, pretty and powerful logger for android
Stars: ✭ 287 (+1588.24%)
Mutual labels:  logcat
einstein
Python Tutorial with popular machine learning algorithms implementation. This tutorial helps you processing data like Einstein
Stars: ✭ 34 (+100%)
Mutual labels:  adb
AndroidSMSRelay
Script to forward and send android(with root) sms using adb
Stars: ✭ 21 (+23.53%)
Mutual labels:  adb
ghost
Ghost Framework is an Android post-exploitation framework that exploits the Android Debug Bridge to remotely access an Android device. Ghost Framework gives you the power and convenience of remote Android device administration.
Stars: ✭ 156 (+817.65%)
Mutual labels:  adb
adb-alfred
adb alfred - all in one
Stars: ✭ 60 (+252.94%)
Mutual labels:  adb

Logcatf Build Status Coverage Status

A Command line tool for format Android Logcat.

Use like this.

$ adb logcat -v time | logcatf --color

Output: ScreenShot

Examples

# show time, pid and message formatted.
$ adb logcat -v time | logcatf "%t %4i %m"

# output to csv format.
$ adb logcat -v threadtime | logcatf --to-csv > logcat.csv

# get screencap on Exception
$ adb logcat -v time | logcatf -o "MY_APP.*Error" -c "adb shell screencap -p /sdcard/a.png"

Install

You can get binary from github release page.

-> Release Page

or, use go get:

$ go get github.com/ujiro99/logcatf

Basic Usage

$ adb logcat -v time | logcatf "%t, %m"

Available Format:

format long ver.
%t %time
%a %tag
%p %priority
%i %pid
%I %tid
%m %message

Other Flags:

Flag description
%a left-align
%8a min-width 8, right-align
%-8a min-width 8, left-align
%8.8a width 8, right-align

Default Format:

"%t %p %a: %m"

Options

execute commands

You can execute other commands when a keyword matched to Logcat.

-o, --on=ON              regex to trigger a COMMAND.
-c, --command=COMMAND    COMMAND will be executed on regex matched.
  • In COMMAND, you can use parsed logcat value using keyword same as format or environment variables.
ex) -o "MY_APP.*Error" -c "echo %m > error.log"
    -o "MY_APP.*Error" -c "echo \${message} > error.log"  # linux, mac
    -o "MY_APP.*Error" -c "echo %message% > error.log"    # Windows
  • Command's stdout is redirected to stderr of logcatf.
  • You can use multiple -o / -c pairs.

Output CSV

output to CSV format.

    --to-csv             output to CSV format. double-quote will be escaped.
    --encode=ENCODE      output character encode. { utf-8 | shift-jis | euc-jp | iso-2022-jp }
  • if use on Windows, encode will be used shift-jis.

Color

specify output Color.

    --color            enable ANSI color. ( defalult = false )
    --color-v=COLOR    - color for verbose.
    --color-d=COLOR    - color for debug.
    --color-i=COLOR    - color for information.
    --color-w=COLOR    - color for warning.
    --color-e=COLOR    - color for error.
    --color-f=COLOR    - color for fatal.
ex) $ adb logcat | logcatf "%t [invert] %a [reset] [_white_] %m" --color --color-i "cyan"

Available Color Tags:

Foreground Background
black dark_gray _black_ _dark_gray_
red light_red _red_ _light_red_
green light_green _green_ _light_green_
yellow light_yellow _yellow_ _light_yellow_
blue light_blue _blue_ _light_blue_
magenta light_magenta _magenta_ _light_magenta_
cyan light_cyan _cyan_ _light_cyan_
white light_gray _white_ _light_gray_
default _default_
Attributes
bold blink_slow
dim blink_fast
underline invert
Reset
reset
reset_bold

Contribution

  1. Fork (https://github.com/ujiro99/logcatf/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

Author

ujiro99

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].