2017 © Pedro Peláez
 

symfony-bundle php4logger-bundle

php4logger log your object with symfony2

image

uga/php4logger-bundle

php4logger log your object with symfony2

  • Tuesday, February 28, 2017
  • by nfouka
  • Repository
  • 1 Watchers
  • 0 Stars
  • 274 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PHP4LoggerApache

Bundle for logger Object for Symfony2, (*1)

 ____  _           _  _   _                                   __            
|  _ \| |__  _ __ | || | | |    ___   __ _  __ _  ___ _ __   / _| ___  _ __ 
| |_) | '_ \| '_ \| || |_| |   / _ \ / _` |/ _` |/ _ \ '__| | |_ / _ \| '__|
|  __/| | | | |_) |__   _| |__| (_) | (_| | (_| |  __/ |    |  _| (_) | |   
|_|   |_| |_| .__/   |_| |_____\___/ \__, |\__, |\___|_|    |_|  \___/|_|   
            |_|                      |___/ |___/                            
 ____                   __                     _           
/ ___| _   _ _ __ ___  / _| ___  _ __  _   _  | |__  _   _ 
\___ \| | | | '_ ` _ \| |_ / _ \| '_ \| | | | | '_ \| | | |
 ___) | |_| | | | | | |  _| (_) | | | | |_| | | |_) | |_| |
|____/ \__, |_| |_| |_|_|  \___/|_| |_|\__, | |_.__/ \__, |
       |___/                           |___/         |___/ 
 ____  _                 _____ ____             
|  _ \| | __ _ _ __   __|_   _|  _ \  _____   __
| |_) | |/ _` | '_ \ / _ \| | | | | |/ _ \ \ / /
|  __/| | (_| | | | |  __/| | | |_| |  __/\ V / 
|_|   |_|\__,_|_| |_|\___||_| |____/ \___| \_/  

How to install ?

Just add this bundle with :, (*2)

composer require uga/php4logger-bundle

Enable it in the Kernel, (*3)

new uga\Php4LoggerApacheBundle\ugaPhp4LoggerApacheBundle(),

How to make it ?

In your controller:, (*4)

        $em = $this->getDoctrine()->getEntityManager() ;  // Object 
        $logger = $this->container->get('uga_php4_logger_apache')->getLogger() ; 
        $logger->info($em); // info
        $logger->error($em); // error
        $logger->warn($em); // warning
        }

Result with color in terminal

tail -f /tmp/error.log |
sed -e 's/\(.*INFO.*\)/\o033[36m\0/' \
    -e 's/\(.*ERROR.*\)/\o033[31m\0/' \
    -e 's/\(.*WARN.*\)/\o033[33m\0/'

Demo

, (*5)

Information:

  • Programmer site :
  • Web Site : https://logging.apache.org/log4php/quickstart.html

Contact Me

Nadir Fouka < nadir@fouka.ovh > * Web Developer Grenoble Alpes University 2017 * Data Scientist Planet@Dev, (*6)

The Versions

28/02 2017

dev-master

9999999-dev https://github.com/nfouka

php4logger log your object with symfony2

  Sources   Download

MIT

The Requires

 

by Nadir Fouka

logger

27/02 2017

1.0

1.0.0.0 https://github.com/nfouka

php4logger log your object with symfony2

  Sources   Download

MIT

The Requires

  • php >=5.2

 

by Nadir Fouka

logger