Question

LogCat output in its color highlighting is very informative and helpful in isolating problems. Sometimes, however, I need to print it to paper (or copy/paste it to an OpenOffice.org Writer document) with the colors!

Is there a way to print LogCat output with the color highlighting? (or at least copy/paste it without losing the color information)?

Was it helpful?

Solution

Am assuming LogCat output can be opened in a VIM IDE. I found this link - http://vimdoc.sourceforge.net/htmldoc/usr_06.html#06.5 which talks about how to print (along with colors). It also talks about how to save to an HTML. Try this out. May help.

OTHER TIPS

I'm afraid I don't have a solution for highlighting inside Eclipse, but if you're using gedit on Debian, you can use this language highlighter I wrote:

<?xml version="1.0" encoding="UTF-8"?>
<language id="logcat" _name="logcat" version="2.0" _section="Others">
    <metadata>
        <property name="mimetypes">text/x-logcat</property>
        <property name="globs">*.logcat</property>
    </metadata>

    <styles>
        <style id="comment" _name="Comment" map-to="def:comment"/>
        <style id="verbose" _name="Verbose" map-to="def:identifier"/>
        <style id="debug"   _name="Debug"   map-to="def:preprocessor"/>
        <style id="info"    _name="Info"    map-to="def:type"/>
        <style id="warning" _name="Warning" map-to="def:constant"/>
        <style id="error"   _name="Error"   map-to="def:keyword"/>
        <style id="fatal"   _name="Fatal"   map-to="def:error"/>
        <style id="others"  _name="Others"  map-to="def:comment"/>
    </styles>

    <definitions>
        <context id="logcat">
            <include>
                <context id="comment" style-ref="comment">
                    <start>--</start>
                    <end>$</end>
                </context>
                <context id="comment" style-ref="comment">
                    <start>#</start>
                    <end>$</end>
                </context>
                <context id="datetime" style-ref="comment">
                    <start>^[0-9]</start>
                    <end>: </end>
                </context>

                <context id="verbose" style-ref="verbose">
                    <start>V/</start>
                    <end>$</end>
                </context>

                <context id="debug" style-ref="debug">
                    <start>D/</start>
                    <end>$</end>
                </context>

                <context id="info" style-ref="info">
                    <start>I/</start>
                    <end>$</end>
                </context>

                <context id="warning" style-ref="warning">
                    <start>W/</start>
                    <end>$</end>
                </context>

                <context id="error" style-ref="error">
                    <start>E/</start>
                    <end>$</end>
                </context>

                <context id="fatal" style-ref="fatal">
                    <start>F/</start>
                    <end>$</end>
                </context>
            </include>
        </context>
    </definitions>
</language>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top