Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    logcat-color 0.3

    Download button

    No screenshots available
    Downloads: 116  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Marshall Culpepper | More programs
    The Apache License 2.0 / FREE
    September 10th, 2012, 00:46 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    logcat-color description

    A colorful alternative to "adb logcat"

    logcat-color is a colorful alternative to the standard adb logcat command from the Android SDK.

    Installation

    Installation with pip / easy_install (may require sudo)

     pip install logcat-color

    .. or ..

     easy_install logcat-color

    Installation from source (requires setuptools, may require sudo)

     python setup.py install

    Configuration

    logcat-color supports a configuration file at $HOME/.logcat-color

    The configuration file is simply a python script, with a few interesting variables and types available to it.

    Sample .logcat-color

    # Width of the TAG column, default is 20
    tag_width = 20

    # Width of the PID column, default is 8
    pid_width = 8

    # Width of priority (log level) column, default is 3
    priority_width = 3


    Profiles

    Profiles allow logcat-color to customize logging even further.

    In short, a single Profile can:

    - Filter certain tags, priorities, or messages
    - Use certain command line arguments
    - Customized display and color configuration

    Profiles live in the logcat-color configuration file. Here is an example:

    Profile(name = "radio",
     # Enable both radio and main buffers (-b radio -b main)
     buffers = ("radio", "main"),

     # Only pay attention to the RIL and RILC tags, and give them custom colors
     # Valid colors: RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE
     tags = {
     "RIL": BLUE,
     "RILC": GREEN
     },

     # Only look at these priority levels
     # Valid priorities: V (verbose), D (debug), I (info), W (warn), E (error), F (fatal)
     priorities = [ "I", "W", "E" ],

     # Only pay attention to log messages that match any of these filters
     # Each string is compiled as a regular expression.
     # Functions are called with the tag, priority, and message and
     # must return True to include the message in the log output.
     filters = [
     r"My Custom Regex",
     lambda tag, priority, message: message == "Custom filter"
     ]
    )


    Examples

    Run and colorify adb logcat

     logcat-color

    Colorify an old logcat text file you have laying around

     logcat-color < /path/to/my.log

    Pipe logcat-color to egrep for only the tags you care about

     logcat-color -e | egrep '(Tag1|Tag2)'

    Run logcat-color with a custom profile for filters, colors, and custom arguments (see Profiles)

     logcat-color < profile-name >

    logcat-color also supports most of the standard adb / logcat arguments, making it a suitable full-time replacement for adb logcat

     alias logcat=/path/to/logcat-color
     logcat -e
     logcat -d
     logcat -s 123456789 -b radio -b main



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    adb logcat | Python library | Python | adb | logcat

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM