1. $logProvider
  2. service in module ng

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.

The default is to log debug messages. You can use ng.$logProvider#debugEnabled to change this.

Dependencies

Methods

  • log();

    Write a log message

  • info();

    Write an information message

  • warn();

    Write a warning message

  • error();

    Write an error message

  • debug();

    Write a debug message

$log.debug()
  • References/JavaScript/AngularJS/ng services/log

debug(); Write a debug message

2025-01-10 15:47:30
$log.info()
  • References/JavaScript/AngularJS/ng services/log

info(); Write an information message

2025-01-10 15:47:30
$log.log()
  • References/JavaScript/AngularJS/ng services/log

log(); Write a log message

2025-01-10 15:47:30
$log.error()
  • References/JavaScript/AngularJS/ng services/log

error(); Write an error message

2025-01-10 15:47:30
$log.warn()
  • References/JavaScript/AngularJS/ng services/log

warn(); Write a warning message

2025-01-10 15:47:30