Browse Source

ZF-9176 and ZF-9790: implement Zend_Log_Formatter::factory() -- add doc English and French

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23675 44c647ce-9c0f-0410-b52a-842ac1e357ba
intiilapa 15 years ago
parent
commit
93a078001a

+ 40 - 0
documentation/manual/en/module_specs/Zend_Log-Factory.xml

@@ -22,6 +22,10 @@ $logger = Zend_Log::factory(array(
         'writerParams' => array(
             'stream'   => '/tmp/zend.log',
         ),
+        'formatterName' => 'Simple',
+        'filterParams' => array(
+            'format'   => '%timestamp%: %message% -- %info%',
+        ),
         'filterName'   => 'Priority',
         'filterParams' => array(
             'priority' => Zend_Log::WARN,
@@ -85,6 +89,42 @@ $logger = Zend_Log::factory(array(
         </varlistentry>
 
         <varlistentry>
+            <term>formatterName (optional)</term>
+
+            <listitem>
+                <para>
+                    The "short" name of a formatter to use with the given log writer; the name of the
+                    formatter minus the leading class prefix/namespace. See the "formatterNamespace" 
+                    entry below for more details. Examples: "Simple", "Xml".
+                </para>
+            </listitem>
+        </varlistentry>
+
+        <varlistentry>
+            <term>formatterParams (optional)</term>
+
+            <listitem>
+                <para>
+                    An associative array of parameters to use when instantiating the log formatter.
+                    Each log formatter's <methodname>factory()</methodname> method will map these to
+                    constructor arguments, as noted below.
+                </para>
+            </listitem>
+        </varlistentry>
+
+        <varlistentry>
+            <term>formatterNamespace (optional)</term>
+
+            <listitem>
+                <para>
+                    The class prefix/namespace to use when constructing the final log formatter
+                    classname. By default, if this is not provided, "Zend_Log_Formatter" is assumed;
+                    however, you can pass your own namespace if you are using a custom log formatter.
+                </para>
+            </listitem>
+        </varlistentry>
+
+        <varlistentry>
             <term>filterName (optional)</term>
 
             <listitem>

+ 38 - 1
documentation/manual/fr/module_specs/Zend_Log-Factory.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- EN-Revision: 23666 -->
+<!-- EN-Revision: 23675 -->
 <!-- Reviewed: no -->
 <sect1 id="zend.log.factory">
     <title>Utiliser la fabrique pour créer des logs</title>
@@ -23,6 +23,10 @@ $logger = Zend_Log::factory(array(
         'writerParams' => array(
             'stream'   => '/tmp/zend.log',
         ),
+        'formatterName' => 'Simple',
+        'filterParams' => array(
+            'format'   => '%timestamp%: %message% -- %info%',
+        ),
         'filterName'   => 'Priority',
         'filterParams' => array(
             'priority' => Zend_Log::WARN,
@@ -83,6 +87,39 @@ $logger = Zend_Log::factory(array(
         </varlistentry>
 
         <varlistentry>
+            <term>formatterName (optionnel)</term>
+
+            <listitem>
+                <para>
+                    Le nom "court" d'un formateur à utiliser sur l'objet d'écriture. Voyez 
+                    "formatterNamespace" pour plus de détails. Exemples: "Simple", "Xml".
+                </para>
+            </listitem>
+        </varlistentry>
+
+        <varlistentry>
+            <term>formatterParams (optionnel)</term>
+
+            <listitem>
+                <para>
+                    Tableau associatif de paramètre à utiliser à l'instanciation de l'objet formateur.
+                    Chaque méthode <methodname>factory()</methodname> fera suivre ces paramètres.
+                </para>
+            </listitem>
+        </varlistentry>
+
+        <varlistentry>
+            <term>formatterNamespace (optionnel)</term>
+
+            <listitem>
+                <para>
+                    Le préfixe de classe ou espace de nom(namespace) à utiliser pour créer le nom de classe
+                    complet de l'objet formateur. Par défault : "Zend_Log_Formatter".
+                </para>
+            </listitem>
+        </varlistentry>
+
+        <varlistentry>
             <term>filterName (optionnel)</term>
 
             <listitem>