Complete with a Keyword List manager and editor, this Parser will allow you to open ANY text-based log file and search it for Keywords contained in the selected Keyword List you made. Results are given in a scrollable Text Box and can be saved in Text.log Format (as it appears in the window) or in a specialized XML Format. Results will give they Keyword found and the logline it was found on for each instance.
The Tools menu contains a section for POL Specialized Log Files. The files it lets you parse are Debug.Log and Script.Log. In Script.Log it finds instances of Runaway Scripts and gives you UNIQUE instances for each. It will display the Script Name and the LST Line the Error was found in. In Debug.Log it will report both Missing Config Files and Script Errors. Script Errors are reported by Script Name, LST line, Offending Function and Offending Parameter. Again, all these can be saved in Text Based log results or a specialized XML format.
The Keyword Editor lets you Add New keyword lists, save them, delete lists, and edit multiple lists. There is a part of the form where you enter your keywords for the list. Remember to click Save!
The Options page is self explanatory
Any bugs or features, let me know. I am also posting the source code as it IS open source (don't make fun of my C# skills, this is my FIRST C# project). Will keep it updated as I make changes
Changelog:
Code: Select all
v1.0b6 (beta)
12-16-2008 - MuadDib
Got bored again. LogParser Class created and all related Parse/Save/Check code
for main Log Parser moved to this Class. Variables needing Private security
have been adjusted for higher security on the variables.
Adjusted main Log Parser text output for readability.
Fixed a crash in Saving log files when results was null.
Changed storage methods for Parse results across the board. Uses less variables
now and handled via internal iterator of foreach.
Save buttons are no longer enabled if result length is less than 8. Why 8?
Cuz that means not even "Keyword:" or "Script: " was written to the results.
12-15-2008 - MuadDib
Playing around. Tools Class removed and using just the Tools Namespace.
ScriptLogResults Class added to Tools namespace. This contains all related
helper functions and variables for the new ScriptLog Parse/Save handling
written for this Class. All public variables/functions made Private.
DebugLogResults Class added to Tools namespace. This contains all related
helper functions and variables for the new DebugLog Parse/Save handling
written for this Class. All public variables/functions made Private.
DebugLogOutput.xml reformatted. Code adjusted to reflect the new format.
v1.0b5 (beta)
12-14-2008 - MuadDib
Debug.Log Parser now includes the Missing Config Files (only 1 instance of each)
and puts them after all the Script Errors.
Creation of new Tools Class. This will contain all the Tools related public code
Added tooltips to the forms. Blah.
12-13-2008 - MuadDib
Save and Parse Code moved to Program class.
Added *.* Filter in Open Log File Dialog.
Command Line Parsing code put in.
Command Line Arguments: (Hint: use "" when you have spaces in names or paths)
Example: parser.exe "My List" C:\logs\logs.log C:\logs\parse_results.xml true
will trigger parser.exe using Keyword List "My List" on the
logs.log file and output XML to the filename give. True is for
Case Sensitive.
<list> <logfile> <resultsfile> | <casesensitive>
list - Keyword List name as it appears in Keywords.xml
logfile - Absolute path and filename to parse: C:\logs\logfile.log
resultsfile - Absolute path and filename for results to be saved in: C:\logs\results.log
Use extension xml for xml output, and log or txt for Text format output.
casesensitive - true/false to use case sensitive feature for keywords. If none
is given, it uses the Options.XML setting.
Debug.Log Parser created under Tools->POL Log Files.
v1.0b4 (Beta)
12-13-2008 - MuadDib
Script.Log Parser File Format saving is now based on filetype select in the Dialog
instead of options, just like main Log Parser. Options removed from Options
Form.
Save As option added to the File Menu in the Main Log Parser. This is disabled
until you Parse a log file. Duh.
Case Sensitive Parse option added to the Options page. Will turn on/off Case
Sensitivity for Keywords and Log Lines when Parsing in the main Log Parser.
Turning it on causes the Log Line and Keyword to be set to all lower case
during the Parse phase. Results are shown with Case intact.
12-12-2008 - MuadDib
Can now select which Keyword List to use in the Main Log Parser where the Welcome
text use to be. Includes a refresh button to refresh after editing. When
you go to parse, it also checks to make sure the selected List was not deleted
in the Editor and resets if need be.
Keyword Editor no longer uses the CurrentList for it's editing. It now can edit
lists independantly without affecting other forms using CurrentList.
Keyword Editor now refreshes all cells after a save to remove empty rows.
Duplicate Keywords are now ignored in loading of Keywords.XML for a single List.
They are also ignored in a single list when saving.
Save As Text/Save As XML Options for main Log Parser removed from the Options
page. This is now handled in the Save File Dialog by selecting the file type
you want to save the file as.
v1.0b3 (Beta)
12-10-2008 - MuadDib
Can now create New Keyword Lists via the Keyword Editor page. List is not added
until you click on the Save button.
A selection box is now given in the Keyword Editor to show all Keyword List's names
that are loaded into memory. Highlight is updated after saving New Lists.
Keyword List saving rewrote. The Keyword Dictionary entry is added/updated for
the current list in the Editor, THEN the XML file is written off of the
Dictionary.
Keyword Editor title now changes based on Keyword List being edited. Also updated
to reflect when adding a new List that is not yet saved.
Can now Delete selected Keyword Lists (must be able to have at least 1 left after
delete or it will tell you that it can't). All views and Current List are
reset to the first List in the Keyword Dictionary. Also gives a Confirm Box.
Delete List is NOT PERM until you click on the Save Lists button.
Loading Keylists in the Editor is now available.
Options - New saved/loaded option called LastUsedList. Saves and Loads the last
used Keyword List (gotten from the CurrentList global). LastUsedList is
populated via the Keyword Editor (when selecting lists to use) and also
will be populated via the Keyword List Selection when you parse.
Note: Currently the main Parse Log screen uses the CurrentList setting instead
of asking which Keyword List to use. This means you have to change lists
by going to the Keyword List Editor and Loading a list there to change lists.
This will change very soon :)
12-09-2008 - MuadDib
Added XML Comments for the Options.XML file. (was bored waiting on the coffee pot)
Keyword Editor is now populated via the Dictionary Storage instead of array.
Added List Name code to the Data Grid in the Keyword Editor (multilist not yet
implemented). Defaults to "Current List" in the Editor, naturally.
"MasterList" is the OVERALL default Keyword List name (if none given etc).
Keyword loading changed. Instead of relying on the Keyword Editor to handle it all
the Keyword Class now handles populating the useable variables.
Keyword Class now handles keeping Count of totals and Keyword Lists. Began adding
Dictionary code for a side-by-side implementation to make sure it all works before
removing the current Array Method.
Keywords are now ignored when loaded from the XML Doc if no "listname" attribute is set.
Until Lists are added, system is using a hardcoded listname for all keywords.
Main Log Parsing now uses the new Keyword Class Dictionary for Parsing.
v1.0b2 (Beta)
12-08-2008 - MuadDib
Keywords.XML is now saved/read in similar fashion as Options.XML. Next step will be
to add the multi-lists support. Ugh.
Created a Keywords.cs for handling an entirely new KeywordsCollection Class being
designed to handle multiple keyword lists, etc. So far just cosmetic and
restructuring the codebase. Haven't switched to Dictionary from Array yet.
Adjusted color settings used on the TextBoxes and Group Boxes on main Parse window
and ScriptLog Parse window. Hopefully takes care of an issue with Windows
Vista (thanks for finding it Olds). Also started making a x86 and x64 build.
Need to install second copy of XP for testing the x64, but lazy :/
12-07-2008 - MuadDib
Options.XML is now using InnerText for child Nodes when saving/reading Options.
Script.Log Parser now checks for duplicate LST entries AND duplicate script name
so the same Script can report Runaways for different parts of the source.
v1.0b1 (Beta)
12-07-2008 - MuadDib
Fixed a bug in the reading of the Tools Default Path.
Added some images and layout files to the VS Solution File. These are for internal
Solution tracking is all. Added all Documentation and Layout files also and
set to Copy on Build for Releases. Less work for me, yay.
12-04-2008 - MuadDib
Save Feature added to Script.Log Parser. XML Format completed for Save.
12-03-2008 - MuadDib
Fixed Bug in setting the Default Log Path. Blah, hate typos.
Revamped Collection System for keywords to minimize code.
Added all options, menus, etc for the upcoming Tools->POL->Scripts.Log Parser.
The Parser itself will parse a Script.log looking for Runaways and make
a more readable report (remove duplicates etc). Allowing text/xml saving also.
Script.Log Parser will currently remove duplicates based only on Script Name/Path.
Results given is grouped by:
Script: <path/name>
.LST Line: <.lst file line marked by ">" at position 1>
v1.0 Beta
12-03-2008 - MuadDib
XML Formatting on Save Results is now Implemented. Uses a set XML Layout format
so that XSLT Sheets are possible for viewing generated output in a customized
manner. Booyah! :/
Current testing shows everything so far is working fine for plain text file
parsing. Will send to a few peeps for more testing. Watch out Olds!
12-02-2008 - MuadDib
Global ArrayList Collector updated when Save button is used on Keyword List Form.
Seperate Options pages combined to a single page with Ok/Reset buttons. Reset
button resets them to the last loaded configuration.
New Option: Save as Text or Save As XML in the Options Page. No XML Formatting
is implemented as of yet. Want to design a XML Layout before I start this.
11-30-2008 - MuadDib
Initial Forms and Code created. All features tested to be working correctly.
No ExceptionCatch engine is currently in place except checking for NULL entries.
Functions similar to the original POL Log Parser written in PHP, but ported to
be more multi-purpose in allowing individual selection of ANY text-based log
files for parsing.
Code: Select all
To-Do List:
1.) Look into seeing if the ArrayList can be Serialized in any fashion in order to
make saving code a hell of a lot less bulky for DebugLog and ScriptLog tools.
2.) Create an Ecompile.log/txt parser(?) to find Errors and Warnings from a captured
Ecompile output file?
3.) Try to come up with some kind of Easter Egg on the About box. Maybe add some small
internal game to play or something. Or just some random string from a selection
of Buy us beer, get more stuff type of quote. lol.
4.) Rewrite Options Form and Options Class like the LogParser and Tools.
5.) Rewrite the Keyword Editor like the others.