PHP Classes
Icontem

File: logger/NmnLoggerUsageExample.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ivan Preziosi  >  Nmn Logger  >  logger/NmnLoggerUsageExample.php  
File: logger/NmnLoggerUsageExample.php
Role: Example script
Content type: text/plain
Description: basic usage example
Class: Nmn Logger
Message logging abstraction
 

Contents

Class file image Download
<?php 

 
/* NMNLOGGER BASIC USAGE EXAMPLE                                     /*
 /*
    NmnLogger is a library that provides logging functionnality to php applications
    Copyright (C) 2006  Ivan Preziosi from netmeans.net - Rome.

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

    For more informations or to join the development of the library contact
    the author at: ivan@netmeans.net
    */


    //First of all put the folder containing the logger folder in the include_path
    
set_include_path('../'.PATH_SEPARATOR); // './' should stands for for the actual folder, replace it with your actual classes or inc folder for example

    //Second include the NmnLogger.php file which contains the static methods to use the logger in it's simplyfied manner
    
require_once 'logger/NmnLogger.php';

    
//Third fire the logging with it's static method:
    
NmnLogger::logString("Hello log!");    
    
//it will log onscreen and on a file placed in the fileLogs folder.
    //for logging to email you have to complete the nmn-logger-config.xml file properties.

    // Thats it! happy logging!




?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products