Polymer mixin for browser console logging. Supports different log levels.
Table of Contents:
Add oo-logger
as dependency to your bower.json
.
$ bower install --save oolymer/oo-logger
Add oo-logger-mixin.html
as HTML import to your *.html
.
<link rel="import" href="../oo-logger/oo-logger-mixin.html">
Add oo.LoggerMixin
to your custom element.
<dom-module id="demo-logger">
<script>
class DemoLogger extends oo.LoggerMixin(Polymer.Element) {
static get is() {
return "demo-logger"
}
ready() {
super.ready()
this._trace("inky")
this._debug("blinky")
this._info("pinky")
this._warn("clyde")
}
}
window.customElements.define(DemoLogger.is, DemoLogger)
</script>
</dom-module>
Install npm
and bower
dependencies.
$ npm install
$ npm run install:bower
Start the development server and open the default browser.
$ npm start
Run test suites in headless browsers.
$ npm test
Update the change log.
$ github_changelog_generator oolymer/oo-logger --simple-list --no-issues --output CHANGES.md --header-label "# CHANGES" --future-release v1.5.3
- Version number format
MAJOR.MINOR.PATCH
, e.g. "1.5.3". - Increase MAJOR for breaking changes.
- Increase MINOR for new features.
- Increase PATCH for bug fixes.