Skip to content

czukowski/tracy-log-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

LogParser COM Plug-In for reading Tracy Debugger Log Files

This package makes it possible to view and query log files written by Tracy Debugger, part of the Nette Framework for PHP, using Microsoft Log Parser.

A COM Plug-In is implemented to parse Tracy log files. Obviously, it'll work only on Windows.

Installation and Usage

After you've downloaded the SCT file from this package, it must be registered using the following syntax:

%SystemRoot%\Syswow64\regsvr32 Tracy.LogParser.Scriptlet.sct

Note the path to regsvr32 executable used, it is needed to work correctly on 64bit Windows. Regsvr32 expects a valid path to the SCT file, so either run the command from the directory where you've placed the file or use the full path.

To use the Plug-In, run Log Parser with parameters that tell it to use this COM Plug-In, for example:

logparser "SELECT * FROM 'C:\foo\exception.log' WHERE TO_DATE(DateTime) = SYSTEM_DATE()" -i:COM -iProgID:Tracy.LogParser.Scriptlet

To unregister the Plug-In, use this command:

%SystemRoot%\Syswow64\regsvr32 /u Tracy.LogParser.Scriptlet.sct

About

Tracy log files contain the following notable features:

DateTime Message  @  Request [ @@  ExceptionFile]
  • DateTime in [YYYY-MM-DD HH:MM:SS] format (wrapped in square brackets)
  • Message is any text message, for error and exception logs this is the respective error message
  • Request is a request URL or CLI command that have originally executed the script, separated by @ from the previous part
  • ExceptionFile, only found in exception logs, states a file name, in which exception details, such as stack trace, can be found. It is separated by @@ from the previous part.

This COM Plug-In is heavily based on tutorials by Robert McMurray on Microsoft blog, especially:

It would not have been possible to create this Plug-In without these. Also, last time I was writing anything in VB was well more than 10 years ago, so there are bound to be some gotchas with this work.

License

This work is released under the MIT License. See LICENSE.md for details.

About

LogParser COM Plug-In for reading Tracy Debugger Log Files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published