Skip to content

A simple spare time project adding proper line numbers to log output by decorating angular $log

License

Notifications You must be signed in to change notification settings

ekinsokmen/decorated-log-with-line-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

decorated-log-with-line-number

One of the important information a log line may give is the line number where the log was generated. While playing around with angular.js the injected log service $log seem to be lacking proper line number support. This is a simple spare time project adding proper line numbers to log output by decorating angular $log.

This project may be used to get some basic knowledge about:

  • Angular.js
  • angular-seed
  • Some node.js tools like npm install npm test
  • Dependency Injection
  • Decorator Pattern
  • Jasmin JS test framework and mocking

Sample console output using the decorator module:

Test log at new DecoratedLogDemoCtrl (.../decorated-log-with-line-number/app/app.js:6:10) angular.js:10126

Test debug at new DecoratedLogDemoCtrl (.../decorated-log-with-line-number/app/app.js:7:10) angular.js:10126

Demo Application

Click here to see it in action

About

A simple spare time project adding proper line numbers to log output by decorating angular $log

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published