Chapter 8. Zend_Log
Prev |  | Next

## Chapter 8. Zend_Log

## 8.1. Introduction

`Zend_Log` is a general purpose logging class. `Zend_Log` is a static class that can not be instantiated directly. It holds an array of instances of `Zend_Log`, one for each log used by the application. Each logger instance uses an adapter that implements `Zend_Log_Adapter_Interface`.

To use `Zend_Log`, include() the `Zend_Log` class and any adapter classes that will be used. For example, if an application will log to both the console (PHP's output buffer) and text files, the following files would be included:

    require_once 'Zend/Log.php';                  // Zend_Log base class
    require_once 'Zend/Log/Adapter/Console.php';  // Console log adapter
    require_once 'Zend/Log/Adapter/File.php';     // File log adapter

`Zend_Log` can be used in a simplified way for a single log, can be configured for multiple logs, and can also be used to log internal operations of many Zend Framework classes.

Prev |  | Next
7.3. JSON Objects | Home | 8.2. Logging to a Single Log