- Sign up for Progstr.Log and obtain an API token. That token is used to identify you against the service.
- Include the
progstr.jsscript on your page by refering it from the
- Configure the API token by setting the
Progstr.apiTokenproperty in a script block:
There are four log severity levels that you can use to log events of different importance:
- Info: used to log general information events that can be used for reference or troubleshooting if needed.
- Warning: something odd happened and somebody needs to know about it.
- Error: something failed and needs to be fixed.
- Fatal: the entire application or a critical part of it is not working at all.
To log an event you need to obtain a logger object and call some of its
var logger = Progstr.logger("js.demo.source") ... logger.info("Loading page: " + window.location.href) ... logger.warning("User not found.") ... logger.error("Operation failed.") ... logger.fatal("Could not connect to server.")
- All major browsers out there.
Available online here.