# angular.service.$log

Work in Progress This page is currently being revised. It might be incomplete or contain inaccuracies.

## Description

Simple service for logging. Default implementation writes the message into the browser's console (if present).

The main purpose of this service is to simplify debugging and troubleshooting.

## Dependencies

- `$window`

## Methods

- ### error()

  Write an error message

- ### info()

  Write an information message

- ### log()

  Write a log message

- ### warn()

  Write a warning message

## Example

       <p>Reload this page with open console, enter text and hit the log button...</p>
       Message:
       <input type="text" name="message" value="Hello World!"/>
       <button ng:click="$log.log(message)">log</button>
       <button ng:click="$log.warn(message)">warn</button>
       <button ng:click="$log.info(message)">info</button>
       <button ng:click="$log.error(message)">error</button>