-
Notifications
You must be signed in to change notification settings - Fork 121
Debug
David Desmaisons edited this page Sep 26, 2016
·
7 revisions
In debug mode, 3 buttons will be displayed:
By default, Neutronium will use the trace listener to log events. Neutronium will log binding errors as well as console.log message from the HTML session.
If you need to use a different logger to output the Neutronium events you can implement your own IWebSessionLogger:
public interface IWebSessionLogger
{
/// <summary>
/// called for debug logging
/// </summary>
void Debug(Func<string> information);
/// <summary>
/// called for debug logging
/// </summary>
void Debug(string information);
/// <summary>
/// called for information logging
/// </summary>
void Info(string information);
/// <summary>
/// called for information logging
/// </summary>
void Info(Func<string> information);
/// <summary>
/// called on critical event
/// </summary>
void Error(string information);
/// <summary>
/// called on critical event
/// </summary>
void Error(Func<string> information);
/// <summary>
/// called on each consolo log called by browser
/// </summary>
void LogBrowser(ConsoleMessageArgs iInformation, Uri url);
/// <summary>
/// called in case of browser critical error
/// </summary>
void WebBrowserError(Exception exception, Action cancel);
}
And then setting Neutronium Engine session logger:
var myLogger = new MyLogger();
HTMLEngineFactory.Engine.WebSessionLogger = myLogger;