Sintaxis para log4j en notepad++
Contenido
He creado el siguiente xml para editar ficheros de log4j en Notepad++. Se ve bien con temas oscuros, como Zenburn, que es el que utilizo.
Para utilizarlo es suficiente con descargarlo e importarlo desde Lenguaje->Definir Idioma...->Importar
.
Una vez reiniciado Notepad++ todos los ficheros con extensión .log se mostrarán con esta sintaxis.
<NotepadPlus>
<UserLang name="LogFile" ext="log">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
<TreatAsSymbol comment="no" commentLine="no" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Folder+"></Keywords>
<Keywords name="Folder-"></Keywords>
<Keywords name="Operators">' - ! " # $ % & ( ) * , . / : ; ? @ [ \ ] ^ _ ` { | } ~ + < = ></Keywords>
<Keywords name="Comments"></Keywords>
<Keywords name="Words1">ERROR Exception</Keywords>
<Keywords name="Words2">WARN WARNING</Keywords>
<Keywords name="Words3">DEBUG</Keywords>
<Keywords name="Words4">INFO java.sql.SQLException java.lang.NullPointerException </Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="DCDCCC" bgColor="3F3F3F" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="7F9F7F" bgColor="3F3F3F" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="FF8040" bgColor="3F3F3F" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="8CD0D3" bgColor="3F3F3F" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORD1" fgColor="3F3F3F" bgColor="FF0000" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORD2" fgColor="3F3F3F" bgColor="FF8000" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORD3" fgColor="3F3F3F" bgColor="FF80FF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORD4" fgColor="3F3F3F" bgColor="0080FF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATOR" fgColor="DFC47D" bgColor="3F3F3F" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="408080" bgColor="3F3F3F" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="CEDF99" bgColor="3F3F3F" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="CC9393" bgColor="3F3F3F" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="CC9393" bgColor="3F3F3F" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>
Está basado en https://gist.github.com/mmdemirbas/3713724, que funciona perfectamente para temas claros, pero con Zenburn no se ve correctamente.