第 16 章 Zend_Log
上一页 |  | 下一页

## 第 16 章 Zend_Log

## 16.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.

上一页 |  | 下一页
15.6. Supported Regions for Locales | 起始页 | 16.2. Logging to a Single Log