Loupe Angular Agent - GibraltarSoftware/Gibraltar.Agent.Web.JavaScript GitHub Wiki
#Loupe Angular Agent
The Angular agent has been designed for use in any Angular 1.x solution.
It provides logging functionality via a Loupe.LogService
and adds a decorator to the Angular $exceptionHandler
service for unhandled exceptions.
As mentioned above the angular agent decorates the normal angular $exceptionHandler
service so that if an error is throw it will be called by angular
and take details of the exception and log them to the server.
See Logging for details on the methods available to log and details on how to log.
The agent has 3 services:
- loupe.logService
- loupe.stacktraceService
- loupe.platformService
Both loupe.stacktraceService
and loupe.platformService
can be used independently of the loupe.logService
if you so wish.
This is the service to use for logging messages to the server
Wraps stackTrace.js and provides the stackTrace.js functionality
Wraps platform.js and provides access to its functionality
As well as the services the agent also exposes a couple of loupe specific "objects":
- logMessageSeverity - an object literial for specifying the serverity on a log messate
- MethodSourceInfo - object to record where a message was logged from see MethodSourceInfo
Both of these are accessed via the logService e.g. logService.write(logService.logMessageSeverity.Verbose,"My Category", "My Caption")
and
var info = new logService.MethodSourceInfo("app.js")