cvs: peardoc /ja/core log.xml /ja/packages log.xml
| From: | Martin Jansen | Date: | Sat, 09 Feb 2002 14:10:23 +0000 |
| Subject: | cvs: peardoc /ja/core log.xml /ja/packages log.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-2343@lists.php.net to get a copy of this message | ||
mj Sat Feb 9 09:10:23 2002 EDT
Added files:
/peardoc/ja/packages log.xml
Removed files:
/peardoc/ja/core log.xml
Log:
* Move Log chapter in japanese documentation.
Index: peardoc/ja/packages/log.xml +++ peardoc/ja/packages/log.xml <?xml encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <reference id="packages.log"> <title>ãã®ã³ã°é¢æ°</title> <titleabbrev>PEARãã°</titleabbrev> <partintro> <simpara> </simpara> </partintro> <refentry id="packages.log.container"> <refnamediv> <refname>ãã®ã³ã°ã³ã³ãã</refname> <refpurpose> <classname>Log</classname> ã¯ãè¤æ°ã®ãã¼ã¿ã³ã³ããããµãã¼ããã¾ ãã </refpurpose> </refnamediv> <refsect1 id="packages.log.container.file"> <title>'file' - Log_file</title> <para> ãã¼ã¿ããã¼ã«ã«ãã¡ã¤ã«ã·ã¹ãã ã®ä»»æã®ãã¡ã¤ã«ã«ä¿åãã¾ãã (localã¨ã¯ãPHPã®ãã¡ã¤ã«ã·ã¹ãã 颿°ã«ããã¢ã¯ã»ã¹å¯è½ãªå ¨ã¦ã®ãã¡ ã¤ã«ãæå³ãã¾ã) </para> </refsect1> <refsect1 id="packages.log.container.mcal"> <title>'mcal' - Log_mcal</title> <para> ã«ã¬ã³ãã¼é¢æ°ã«ãã¼ã¿ãä¿åãã¾ãããã®é¢æ°ã¯ã <command>libmcal</command>ã¨<command>mcal</command> PHPæ¡å¼µã¢ã¸ã¥ã¼ ã«ãå¿ è¦ã¨ãã¾ãã </para> </refsect1> <refsect1 id="packages.log.container.sql"> <title>'sql' - Log_sql</title> <para> <link linkend="core.db">PEAR::DB</link>ãç¨ã㦠ãã¼ã¿ãã¼ã¹ã«ãã¼ã¿ãä¿åãã¾ãã </para> </refsect1> <refsect1 id="packages.log.container.syslog"> <title>'sql' - Log_syslog</title> <para> UNIXãã¼ã¹ã®ã·ã¹ãã ã§ã¯<command>syslog</command>ã Windows NT/2000/XPã§ã¯<command>ã¤ãã³ããã°</command>ãç¨ãã¦ãã¼ ã¿ãä¿åãã¾ãã </para> </refsect1> </refentry> <refentry id="packages.log.init"> <refnamediv> <refname>åæå</refname> <refpurpose><classname>Log</classname>ãªãã¸ã§ã¯ãã使ãã</refpurpose> </refnamediv> <refsect1> <title></title> <para> There are three possible methods to create a <classname>Log</classname> object. You can create a <classname>Log_</classname> object directly or call either the <link linkend="packages.log.log.singleton"><function> &singleton</function></link> or the <link linkend="packages.log.log.factory"><function>factory</function> </link> method of the <classname>Log</classname> class. </para> <example> <title>åæåã®ä¾</title> <programlisting role="php"> <![CDATA[ // direct initialization of the 'file' container $log = new Log_file('log.txt', 'identity text'); // initialization of the 'file' container through factory() $log = Log::factory('file', 'log.txt', 'identity text'); // initialization of the 'file' container through singelton() $log = &Log::singelton('file', 'log.txt', 'identity text'); ]]> </programlisting> </example> <para> Directly initializing an instance of the <classname>Log</classname> is probably the easiest method to understand. </para> <para> The second two approaches make use of software engineering design patterns (the "factory" and "singleton" metaphors). </para> <para> Specifically, calling the <function>factory</function> method will create a new instance of one of the <classname>Log_</classname> subclasses. The type of subclass that is returned is specified by the first parameter (<parameter>log_type</parameter>) passed to the <function>factory</function> method. This approach effectively hides the subclasses while still allowing the programmer to request a concrete instance of a certain subclass. This is useful in cases where the subclass type needs to be chosen at runtime. </para> <para> The <function>factory</function> method must always be called using PHP's static method notation - <literal>Log::factory</literal>. </para> <para> The <function>singleton</function> method is identical to the <function>factory</function> method except that it guarantees that only a single instance of the requested <classname>Log_</classname> subclass exists. The <function>singleton</function> method bases each instance's uniqueness on the parameters used in the instance's creation. In other words, only one instance with a given set of creation parameters will ever be returned by the <function>singleton</function> method. The second invocation will simply return a reference to the existing instance. </para> <para> The <function>singleton</function> method must also be called statically. In addition, it requires PHP's reference notation - <literal>&Log::singleton</literal>. </para> </refsect1> </refentry> <refentry id="packages.log.log"> <refnamediv> <refname>Log</refname> <refpurpose>ãã°æ½è±¡åã¯ã©ã¹</refpurpose> </refnamediv> <refsynopsisdiv> <synopsis>require_once "Log.php";</synopsis> </refsynopsisdiv> <refsect1> <title>説æ</title> <simpara> Logging interface functions. </simpara> </refsect1> <refsect1 id="packages.log.log.factory"> <title>Log::factory</title> <funcsynopsis> <funcprototype> <funcdef>object <function>Log::factory</function></funcdef> <paramdef>string <parameter>log_type</parameter></paramdef> <paramdef>string <parameter><optional>log_name</optional></parameter></paramdef> <paramdef>string <parameter><optional>ident</optional></parameter></paramdef> <paramdef>array <parameter><optional>conf</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> Return a concrete Log instance of <parameter>log_type</parameter>. </para> </refsect1> <refsect1 id="packages.log.log.singleton"> <title>Log::singleton</title> <funcsynopsis> <funcprototype> <funcdef>object <function>Log::singleton</function></funcdef> <paramdef>string <parameter>log_type</parameter></paramdef> <paramdef>string <parameter><optional>log_name</optional></parameter></paramdef> <paramdef>string <parameter><optional>ident</optional></parameter></paramdef> <paramdef>array <parameter><optional>conf</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> Returns a reference to a concrete Log instance of <parameter>log_type</parameter>, only creating a new instance if no Log instance with the same parameters currently exists. </para> <para> You should use this if there are multiple places you might create a logger, you don't want to create multiple loggers, and you don't want to check for the existance of one each time. The singleton pattern does all the checking work for you. </para> <para> <note> <simpara> You MUST call this method with the <literal>$var = &Log::singleton() </literal>syntax. Without the ampersand (&) in front of the method name, you will not get a reference; you will get a copy. </simpara> </note> </para> </refsect1> <refsect1 id="packages.log.log.attach"> <title>Log::attach</title> <funcsynopsis> <funcprototype> <funcdef><function>Log::attach</function></funcdef> <paramdef>object <parameter>logObserver</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Adds a <link linkend="packages.log.observer">Log_Observer</link> instance to the list of observers that are to be notified when a message is logged. </para> </refsect1> <refsect1 id="packages.log.log.detach"> <title>Log::detach</title> <funcsynopsis> <funcprototype> <funcdef><function>Log::detach</function></funcdef> <paramdef>object <parameter>logObserver</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Removes a <link linkend="packages.log.observer">Log_Observer</link> instance from the list of observers. </para> </refsect1> <refsect1 id="packages.log.log.notifyall"> <title>Log::notifyAll</title> <funcsynopsis> <funcprototype> <funcdef><function>Log::notifyAll</function></funcdef> <paramdef>array <parameter>messageOb</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Sends any <link linkend="packages.log.observer">Log_Observer</link> objects listening to this Log the message that was just logged. </para> </refsect1> </refentry> <refentry id="packages.log.observer"> <refnamediv> <refname>Log_Observer</refname> <refpurpose>Log観測ã¯ã©ã¹</refpurpose> </refnamediv> <refsynopsisdiv> <synopsis>require_once "Log/Log_Observer.php";</synopsis> </refsynopsisdiv> <refsect1> <title>説æ</title> <simpara> Log_Observerã¯ã©ã¹ã¯ããã°å¦çãç£è¦ããéè¦ãªã¤ãã³ããçºçãã å ´åã«è¡åãèµ·ããããã«ãSubject-Observerãã¿ã¼ã³ã®Observerå´ã å®è£ ãã¾ãã </simpara> </refsect1> <refsect1 id="packages.log.observer.factory"> <title>Log_Observer::factory</title> <funcsynopsis> <funcprototype> <funcdef>object <function>Log_Observer::factory</function></funcdef> <paramdef>string <parameter>observer_type</parameter></paramdef> <paramdef>integer <parameter><optional>priority</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> <para> æå®ãã<parameter>observer_type</parameter>ã®å ·ä½ç㪠Log_Observerã¤ã³ã¹ã¿ã³ã¹ãè¿ãã¾ãã </para> </refsect1> </refentry> </reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
Index: peardoc/ja/packages/log.xml +++ peardoc/ja/packages/log.xml <?xml encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <reference id="packages.log"> <title>ãã®ã³ã°é¢æ°</title> <titleabbrev>PEARãã°</titleabbrev> <partintro> <simpara> </simpara> </partintro> <refentry id="packages.log.container"> <refnamediv> <refname>ãã®ã³ã°ã³ã³ãã</refname> <refpurpose> <classname>Log</classname> ã¯ãè¤æ°ã®ãã¼ã¿ã³ã³ããããµãã¼ããã¾ ãã </refpurpose> </refnamediv> <refsect1 id="packages.log.container.file"> <title>'file' - Log_file</title> <para> ãã¼ã¿ããã¼ã«ã«ãã¡ã¤ã«ã·ã¹ãã ã®ä»»æã®ãã¡ã¤ã«ã«ä¿åãã¾ãã (localã¨ã¯ãPHPã®ãã¡ã¤ã«ã·ã¹ãã 颿°ã«ããã¢ã¯ã»ã¹å¯è½ãªå ¨ã¦ã®ãã¡ ã¤ã«ãæå³ãã¾ã) </para> </refsect1> <refsect1 id="packages.log.container.mcal"> <title>'mcal' - Log_mcal</title> <para> ã«ã¬ã³ãã¼é¢æ°ã«ãã¼ã¿ãä¿åãã¾ãããã®é¢æ°ã¯ã <command>libmcal</command>ã¨<command>mcal</command> PHPæ¡å¼µã¢ã¸ã¥ã¼ ã«ãå¿ è¦ã¨ãã¾ãã </para> </refsect1> <refsect1 id="packages.log.container.sql"> <title>'sql' - Log_sql</title> <para> <link linkend="core.db">PEAR::DB</link>ãç¨ã㦠ãã¼ã¿ãã¼ã¹ã«ãã¼ã¿ãä¿åãã¾ãã </para> </refsect1> <refsect1 id="packages.log.container.syslog"> <title>'sql' - Log_syslog</title> <para> UNIXãã¼ã¹ã®ã·ã¹ãã ã§ã¯<command>syslog</command>ã Windows NT/2000/XPã§ã¯<command>ã¤ãã³ããã°</command>ãç¨ãã¦ãã¼ ã¿ãä¿åãã¾ãã </para> </refsect1> </refentry> <refentry id="packages.log.init"> <refnamediv> <refname>åæå</refname> <refpurpose><classname>Log</classname>ãªãã¸ã§ã¯ãã使ãã</refpurpose> </refnamediv> <refsect1> <title></title> <para> There are three possible methods to create a <classname>Log</classname> object. You can create a <classname>Log_</classname> object directly or call either the <link linkend="packages.log.log.singleton"><function> &singleton</function></link> or the <link linkend="packages.log.log.factory"><function>factory</function> </link> method of the <classname>Log</classname> class. </para> <example> <title>åæåã®ä¾</title> <programlisting role="php"> <![CDATA[ // direct initialization of the 'file' container $log = new Log_file('log.txt', 'identity text'); // initialization of the 'file' container through factory() $log = Log::factory('file', 'log.txt', 'identity text'); // initialization of the 'file' container through singelton() $log = &Log::singelton('file', 'log.txt', 'identity text'); ]]> </programlisting> </example> <para> Directly initializing an instance of the <classname>Log</classname> is probably the easiest method to understand. </para> <para> The second two approaches make use of software engineering design patterns (the "factory" and "singleton" metaphors). </para> <para> Specifically, calling the <function>factory</function> method will create a new instance of one of the <classname>Log_</classname> subclasses. The type of subclass that is returned is specified by the first parameter (<parameter>log_type</parameter>) passed to the <function>factory</function> method. This approach effectively hides the subclasses while still allowing the programmer to request a concrete instance of a certain subclass. This is useful in cases where the subclass type needs to be chosen at runtime. </para> <para> The <function>factory</function> method must always be called using PHP's static method notation - <literal>Log::factory</literal>. </para> <para> The <function>singleton</function> method is identical to the <function>factory</function> method except that it guarantees that only a single instance of the requested <classname>Log_</classname> subclass exists. The <function>singleton</function> method bases each instance's uniqueness on the parameters used in the instance's creation. In other words, only one instance with a given set of creation parameters will ever be returned by the <function>singleton</function> method. The second invocation will simply return a reference to the existing instance. </para> <para> The <function>singleton</function> method must also be called statically. In addition, it requires PHP's reference notation - <literal>&Log::singleton</literal>. </para> </refsect1> </refentry> <refentry id="packages.log.log"> <refnamediv> <refname>Log</refname> <refpurpose>ãã°æ½è±¡åã¯ã©ã¹</refpurpose> </refnamediv> <refsynopsisdiv> <synopsis>require_once "Log.php";</synopsis> </refsynopsisdiv> <refsect1> <title>説æ</title> <simpara> Logging interface functions. </simpara> </refsect1> <refsect1 id="packages.log.log.factory"> <title>Log::factory</title> <funcsynopsis> <funcprototype> <funcdef>object <function>Log::factory</function></funcdef> <paramdef>string <parameter>log_type</parameter></paramdef> <paramdef>string <parameter><optional>log_name</optional></parameter></paramdef> <paramdef>string <parameter><optional>ident</optional></parameter></paramdef> <paramdef>array <parameter><optional>conf</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> Return a concrete Log instance of <parameter>log_type</parameter>. </para> </refsect1> <refsect1 id="packages.log.log.singleton"> <title>Log::singleton</title> <funcsynopsis> <funcprototype> <funcdef>object <function>Log::singleton</function></funcdef> <paramdef>string <parameter>log_type</parameter></paramdef> <paramdef>string <parameter><optional>log_name</optional></parameter></paramdef> <paramdef>string <parameter><optional>ident</optional></parameter></paramdef> <paramdef>array <parameter><optional>conf</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> Returns a reference to a concrete Log instance of <parameter>log_type</parameter>, only creating a new instance if no Log instance with the same parameters currently exists. </para> <para> You should use this if there are multiple places you might create a logger, you don't want to create multiple loggers, and you don't want to check for the existance of one each time. The singleton pattern does all the checking work for you. </para> <para> <note> <simpara> You MUST call this method with the <literal>$var = &Log::singleton() </literal>syntax. Without the ampersand (&) in front of the method name, you will not get a reference; you will get a copy. </simpara> </note> </para> </refsect1> <refsect1 id="packages.log.log.attach"> <title>Log::attach</title> <funcsynopsis> <funcprototype> <funcdef><function>Log::attach</function></funcdef> <paramdef>object <parameter>logObserver</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Adds a <link linkend="packages.log.observer">Log_Observer</link> instance to the list of observers that are to be notified when a message is logged. </para> </refsect1> <refsect1 id="packages.log.log.detach"> <title>Log::detach</title> <funcsynopsis> <funcprototype> <funcdef><function>Log::detach</function></funcdef> <paramdef>object <parameter>logObserver</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Removes a <link linkend="packages.log.observer">Log_Observer</link> instance from the list of observers. </para> </refsect1> <refsect1 id="packages.log.log.notifyall"> <title>Log::notifyAll</title> <funcsynopsis> <funcprototype> <funcdef><function>Log::notifyAll</function></funcdef> <paramdef>array <parameter>messageOb</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Sends any <link linkend="packages.log.observer">Log_Observer</link> objects listening to this Log the message that was just logged. </para> </refsect1> </refentry> <refentry id="packages.log.observer"> <refnamediv> <refname>Log_Observer</refname> <refpurpose>Log観測ã¯ã©ã¹</refpurpose> </refnamediv> <refsynopsisdiv> <synopsis>require_once "Log/Log_Observer.php";</synopsis> </refsynopsisdiv> <refsect1> <title>説æ</title> <simpara> Log_Observerã¯ã©ã¹ã¯ããã°å¦çãç£è¦ããéè¦ãªã¤ãã³ããçºçãã å ´åã«è¡åãèµ·ããããã«ãSubject-Observerãã¿ã¼ã³ã®Observerå´ã å®è£ ãã¾ãã </simpara> </refsect1> <refsect1 id="packages.log.observer.factory"> <title>Log_Observer::factory</title> <funcsynopsis> <funcprototype> <funcdef>object <function>Log_Observer::factory</function></funcdef> <paramdef>string <parameter>observer_type</parameter></paramdef> <paramdef>integer <parameter><optional>priority</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> <para> æå®ãã<parameter>observer_type</parameter>ã®å ·ä½ç㪠Log_Observerã¤ã³ã¹ã¿ã³ã¹ãè¿ãã¾ãã </para> </refsect1> </refentry> </reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->