借助Notepad++的自定义语言可以实现日志的按照不同级别的高亮;
参考: https://blog.csdn.net/commshare/article/details/131208656
在此基础上做了一点修改效果如下:

最终实现了类似idea中的效果,我这个是深色模式。主题是Black board

<NotepadPlus>
    <UserLang name="Spring_Log_Dark" ext="log" udlVersion="2.1">
        <Settings>
            <Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
            <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
        </Settings>
        <KeywordLists>
            <Keywords name="Keywords1">INFO info OK SUCCESS successfully ENABLED</Keywords>
            <Keywords name="Keywords2">ERROR error FAIL failed CRITICAL SEVERE Exception</Keywords>
            <Keywords name="Keywords3">WARN warn WARNING warning CAUTION</Keywords>
            <Keywords name="Keywords4">DEBUG debug TRACE trace</Keywords>
            <Keywords name="Comments">Traceback ArithmeticError AssertionError AttributeError BaseException BlockingIOError BrokenPipeError BufferError ChildProcessError ConnectionAbortedError ConnectionError ConnectionRefusedError ConnectionResetError EOFError EnvironmentError Exception FileExistsError FileNotFoundError FloatingPointError GeneratorExit IOError ImportError IndentationError IndexError InterruptedError IsADirectoryError KeyError KeyboardInterrupt LookupError MemoryError ModuleNotFoundError NameError NotADirectoryError NotImplemented NotImplementedError OSError OverflowError PermissionError ProcessLookupError RecursionError ReferenceError RuntimeError StopAsyncIteration StopIteration SyntaxError SystemError SystemExit TabError TimeoutError TypeError UnboundLocalError UnicodeDecodeError UnicodeEncodeError UnicodeError UnicodeTranslateError ValueError WindowsError ZeroDivisionError</Keywords>
            <Keywords name="Numbers">0 1 2 3 4 5 6 7 8 9</Keywords>
            <Keywords name="Operators1">[ ] ( ) - : .</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" fgColor="DCDCDC" bgColor="000000" fontName="" fontStyle="0" />
            <WordsStyle name="COMMENTS" fgColor="FF8040" bgColor="000000" fontName="" fontStyle="1" />
            <WordsStyle name="NUMBERS" fgColor="6897BB" bgColor="000000" fontName="" fontStyle="0" />
            <WordsStyle name="KEYWORDS1" fgColor="4FC416" bgColor="000000" fontName="" fontStyle="1" />
            <WordsStyle name="KEYWORDS2" fgColor="FF0000" bgColor="000000" fontName="" fontStyle="1" />
            <WordsStyle name="KEYWORDS3" fgColor="EBC03F" bgColor="000000" fontName="" fontStyle="1" />
            <WordsStyle name="KEYWORDS4" fgColor="299999" bgColor="000000" fontName="" fontStyle="0" />
            <WordsStyle name="OPERATORS" fgColor="808080" bgColor="000000" fontName="" fontStyle="0" />
        </Styles>
    </UserLang>
</NotepadPlus>

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐