5

色の強調表示でのLogCat出力は、問題を特定するのに非常に有益で役立ちます。ただし、場合によっては、色を使用してに印刷する(またはOpenOffice.org Writerドキュメントにコピーして貼り付ける)必要があります。

LogCat出力を色の強調表示で印刷する方法はありますか?(または少なくとも色情報を失うことなくコピー/貼り付け)?

4

2 に答える 2

1

LogCat出力をVIMIDEで開くことができると想定しています。私はこのリンクを見つけました-http://vimdoc.sourceforge.net/htmldoc/usr_06.html#06.5印刷方法(色とともに)について説明しています。また、HTMLに保存する方法についても説明します。これを試してみてください。役立つかもしれません。

于 2011-05-09T16:00:05.113 に答える
0

Eclipse内でハイライトするための解決策がないのではないかと思いますが、Debianでgeditを使用している場合は、私が書いたこの言語ハイライターを使用できます。

<?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>
于 2014-01-24T12:46:15.240 に答える