1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<sect2 id="zend.application.available-resources.log">
<title>Zend_Application_Resource_Log</title>
<para>
<classname>Zend_Application_Resource_Log</classname> to instantiate a
<classname>Zend_Log</classname> instance with an arbitrary number of log writers.
Configuration will be passed to the <methodname>Zend_Log::factory()</methodname> method,
allowing you to specify combinations of log writers and filters. The log instance may then
be retrieved from the bootstrap later in order to log events.
</para>
<example id="zend.application.available-resources.log.configExample">
<title>Sample Log Resource Configuration</title>
<para>
Below is a sample <acronym>INI</acronym> snippet showing how to
configure the log resource.
</para>
<programlisting language="ini"><![CDATA[
resources.log.stream.writerName = "Stream"
resources.log.stream.writerParams.stream = APPLICATION_PATH "/../data/logs/application.log"
resources.log.stream.writerParams.mode = "a"
resources.log.stream.filterName = "Priority"
resources.log.stream.filterParams.priority = 4
]]></programlisting>
<para>
For more information on available options, please review the <link
linkend="zend.log.factory">Zend_Log::factory() documentation</link>.
</para>
</example>
</sect2>
|