HttpWatch Automation Reference - Version 11.x
Using HttpWatch Automation with C# / C# - Opening a Log File
In This Topic
    C# - Opening a Log File
    In This Topic

    HttpWatch log files (.hwl) can be opened manually in HttpWatch Studio or through the HttpWatch automation interface.

    If you are writing a program from scratch to open an HttpWatch log file you first need to create an instance the Controller object.  Then open an existing log file using the Controller object's OpenLog method:

     

    Opening an HttpWatch Log File (.hwl)
    Copy Code
    // You always need to create an instance of Controller to use the HttpWatch Automation
    HttpWatch.Controller controller = new HttpWatch.Controller();
    
    // Open the log file and keep a reference to the returned Log object
    HttpWatch.Log log = controller.OpenLog(@"c:\temp\test.hwl");
    
    // Access the data in the lof file using properties of the log object
    Console.WriteLine( "The log file contains " + log.Entries.Count + " entries"); 
    

     

    Note that the OpenLog method returns a Log object directly and does not use the Plugin object. Therefore it is not necessary to create a browser instance to open existing log files.

    See Also