How to parse the log file using Notepad + +
Learn how to efficiently parse log files using Notepad++. While several tools offer log parsing solutions, my experience reveals that many testers and developers rely on Notepad++ for log analysis.
In this guide, I’ll demonstrate the simple configuration steps in Notepad++ to streamline log analysis, often searching for keywords like ‘Fatal,’ ‘Error,’ or ‘Warn’.
An easy way to identify the Exception in the log to mark each search entry in color. You could write a script and save it as an XML file, see an example:
– <NotepadPlus>
– <UserLang name=”server lag” ext=”log“>
– <Settings>
<Global caseIgnored=”no” />
<TreatAsSymbol comment=”no” commentLine=”no” />
<Prefix words1=”no” words2=”no” words3=”no” words4=”no” />
</Settings>
– <KeywordLists>
<Keywords name=”Delimiters“>(00)00</Keywords>
<Keywords name=”Folder+” />
<Keywords name=”Folder-” />
<Keywords name=”Operators” />
<Keywords name=”Comment” />
<Keywords name=”Words1“>FATAL</Keywords>
<Keywords name=”Words2“>ERROR</Keywords>
<Keywords name=”Words3“>WARN</Keywords>
<Keywords name=”Words4” />
</KeywordLists>
– <Styles>
<WordsStyle name=”DEFAULT” styleID=”11” fgColor=”000000” bgColor=”FFFFFF” fontName=”” fontStyle=”0” />
<WordsStyle name=”FOLDEROPEN” styleID=”12” fgColor=”000000” bgColor=”FFFFFF” fontName=”” fontStyle=”0” />
<WordsStyle name=”FOLDERCLOSE” styleID=”13” fgColor=”000000” bgColor=”FFFFFF” fontName=”” fontStyle=”0” />
<WordsStyle name=”KEYWORD1” styleID=”5” fgColor=”8000FF” bgColor=”FFFFFF” fontName=”” fontStyle=”1” />
<WordsStyle name=”KEYWORD2” styleID=”6” fgColor=”FF0000” bgColor=”FFFFFF” fontName=”” fontStyle=”1” />
<WordsStyle name=”KEYWORD3” styleID=”7” fgColor=”FF8000” bgColor=”FFFFFF” fontName=”” fontStyle=”1” />
<WordsStyle name=”KEYWORD4” styleID=”8” fgColor=”003162” bgColor=”FFFFFF” fontName=”” fontStyle=”0” />
<WordsStyle name=”COMMENT” styleID=”1” fgColor=”000000” bgColor=”FFFFFF” fontName=”” fontStyle=”0” />
<WordsStyle name=”COMMENT LINE” styleID=”2” fgColor=”000000” bgColor=”FFFFFF” fontName=”” fontStyle=”0” />
<WordsStyle name=”NUMBER” styleID=”4” fgColor=”000000” bgColor=”FFFFFF” fontName=”” fontStyle=”0” />
<WordsStyle name=”OPERATOR” styleID=”10” fgColor=”000000” bgColor=”FFFFFF” fontName=”” fontStyle=”1” />
<WordsStyle name=”DELIMINER1” styleID=”14” fgColor=”000000” bgColor=”EAEAEA” fontName=”” fontStyle=”0” />
<WordsStyle name=”DELIMINER2” styleID=”15” fgColor=”000000” bgColor=”FFFFFF” fontName=”” fontStyle=”0” />
<WordsStyle name=”DELIMINER3” styleID=”16” fgColor=”000000” bgColor=”FFFFFF” fontName=”” fontStyle=”0” />
</Styles>
</UserLang>
</NotepadPlus>
What are you using to logs analyzing? Comment here your best practices with an logs.
Is this post helpful for you? Share your thoughts in comments on how it helped you.
Join to Productive Hut Family and be part of our community!
No Comments