talker

Enhance AngularJS logger
Homepage:
0 people use it
Submitted by: 4641116?v=3 RobinBressan

Talker Build Status

Enhance AngularJS logger. Talker adds hooks and decorating features to the logger and provides some (localStorage hook, HTTP hook, alert hook, datetime decorator).

Installation

Install it with bower:

And include it :

Usage

First add the talker dependecy to your application:

That's all, the $log service has now three new methods : before, after, decorate.

Hooks

Use before and after method to add a hook to the logger :

You can add a priority to it:

Hooks with higher priority are called first.

You can also specify a log type (info, log, warn, error, debug):

The after hook works the same:

Talker provides 3 hooks : tkAlertHook, tkLocalStorageHook, tkHttpHook. They are available in your application as services, and some are configurable with config :

Decorators

You can decorate a log using decorate:

You can add a priority to it:

Decorators with higher priority are called first.

Talker provides 1 decorator : tkDateTimeDecorator. It is available in your application as a service, and is configurable with config :

License

This application is available under the MIT License.

comments powered by Disqus
This page was last updated almost 4 years ago.