• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

PT Log File to Database Parser

RZA-PT | KilroyPT
Joined
Aug 27, 2007
Messages
936
Reaction score
85
Hi All

i got sick of sifting through log files so I made this console app that will read and parse them to a database for you.
Database is simply:

- ID (INT) Identity,
- Checksum (NVARCHAR), Checksum of entry used to prevent duplicates
- Type (NVARCHAR), Log type (admin, debug, server, aging etc etc)
- Timestamp (DATETIME), log entry time
- Msg (NVARCHAR), Log message

First run will prompt you for database connection info, database and table names,
It will then create the tables in the chosen database.
It will also create logparser.ini which will hold those settings along with timeout and overwrite
set overwrite to "true" if you wish it to delete the files once they have been processed (it will only delete if it successfully processes the entire file.
This helps reduce run time of the task and saves storage space.
be default this is set to false.
timeout is the time in minutes between each passing, default is 5 minutes.





I find this useful cause then logs can be audited through a web interface tool and its much quicker than trying to process over the files every time.

I hope its of use to others :)
 
Moderator
Staff member
Moderator
Joined
Feb 22, 2008
Messages
2,404
Reaction score
724
I see. Well, if you want to improve your knoledge, you can always create a dll to override that specific method and make it work for every server.
Nonetheless, very good initiative
 
RZA-PT | KilroyPT
Joined
Aug 27, 2007
Messages
936
Reaction score
85
yea when life isnt so chaotic I want to build DLL's out of the source for logging and items etc, (much the way vormav did writefield)

butttt with a kid on the way i think i wont get much time :D
 
Back
Top