Simple service for logging. Default implementation safely writes the message into the browser's console (if present).
The main purpose of this service is to simplify debugging and troubleshooting.
To reveal the location of the calls to $log
in the JavaScript console, you can "blackbox" the AngularJS source in your browser:
Mozilla description of blackboxing. Chrome description of blackboxing.
Note: Not all browsers support blackboxing.
The default is to log debug
messages. You can use ng.$logProvider#debugEnabled to change this.
Write a log message
Write an information message
Write a warning message
Write an error message
Write a debug message
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.6.6/docs/api/ng/service/$log