PHP Classes

File: HowToInstall.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Claudius Tiberiu Iacob  >  Logger_ciacob  >  HowToInstall.txt  >  Download  
File: HowToInstall.txt
Role: Auxiliary data
Content type: text/plain
Description: Getting Started guide
Class: Logger_ciacob
Log variable values to files
Author: By
Last change:
Date: 5 years ago
Size: 3,807 bytes


Class file image Download

 1. What is Logger
 2. What the demo does
 3. Installing the demo
 4. License
 5. Author
 6. Version

 1. Logger is a PHP class that records onto your harddisk values from your running PHP program. You'll
 	typically use it as a debugger tool, when step debugging isn't applicable. The class can also be
 	used in production, as a simple logging solution.

 2. This demo contains a sample PHP class, ./LoggerDemo.php. You will first run this class in order to
    cause Logger to write values on disk, then you will check the resulting log file.

 3. a) ParamsProxy Setup
       If you have already setup ParamsProxy on this machine, you may skip this step, in whole or in

       Logger is built on top of the ParamsProxy class. Before being able to use the ParamsProxy class,
       you must setup a configuration folder. All configuration files will live in here, each placed
       under a sub-folder with the same name as the name of the class to be configured.

       Under Unix, create this folder:

       Under Windows, create this folder:

       Open the file ./ParamsProxy_config.xml and fill in the path of the folder just created,


    b) Configuration file
       The Logger class sets itself up by reading a configuration file; you must place this file in the
       proper location:

       i.   change into /home/MyConfig (on Unix) or C:\MyConfig (on Windows);
       ii.  create sub-folder Logger
       iii. change into just created sub-folder
       iv.  copy provided file ./config.xml as /home/MyConfig/Logger/config.xml (on Unix) or as
            C:\MyConfig\Logger\config.xml (on Windows)

    c) Logs folder
       The Logger class will store all log files under the logs folder, grouping them by contexts. A
       context is essentially a sub-folder that groups values that a number of subscribing PHP classes
       log. These values, although coming from different classes, go into the same log file. Consult
       the ./Logger.html for more information on contexts.

       The location of the logs folder is bound to the location of the configuration folder: the two
       share the same parent folder. For example, in this demo, the two locations are:

                              ON UNIX             ON WINDOWS
       CONFIGURATION FOLDER   /home/MyConfig      C:\MyConfig
       LOGS FOLDER            /home/logs          C:\logs

       Only on Unix: create folder /home/logs and set it full permissions (octal 0777).

    d) Completing installation
       Point your browser to the LoggerDemo.php file. If you have correctly installed Logger, you should
       see a notice, containing the absolute path to the created log file.

       Observe the source code of ./LoggerDemo.php and the resulting log entries to get a feeling of
       how logging is done. You'll also want to examine the configuration file and the documentation
       (./Logger.html) in order to learn how to declare contexts and customize logging output.

4. Both this demo and the Logger class are licensed under the Creative Commons Attribution Share
   Alike license. You should have received a full copy of this license as
   ./Creative Commons Attribution Share Alike.txt. The full license body is also available
   online, at

5. The Logger class has been written and is being maintained by Claudius Tiberiu Iacob. You can reach
   me at

6. You're holding version 1.5a (alpha) of Logger. Please note that API and functionality are subject to
   change in future versions. Send all bugs to, thank you.