Skip to content

Polymer mixin for browser console logging. Supports different log levels.

License

Notifications You must be signed in to change notification settings

oolymer/oo-logger

Repository files navigation

oo-logger

Travis Build MIT License Polymer 2

Polymer mixin for browser console logging. Supports different log levels.

Table of Contents:

Usage

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>

Contributing

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

Semantic Versions

  • 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.

About

Polymer mixin for browser console logging. Supports different log levels.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages