2017 © Pedro Peláez
 

library logbook-php

PSR compatible logger to send logs from php applications to the logbook server and client.

image

axel-kummer/logbook-php

PSR compatible logger to send logs from php applications to the logbook server and client.

  • Sunday, February 11, 2018
  • by axel-kummer
  • Repository
  • 3 Watchers
  • 0 Stars
  • 103 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 6 Versions
  • 11 % Grown

The README.md

logbook-php

This package provides a PSR compatible Logger to send logs to the logbook server and client, https://github.com/alexgunkel/logbook. The Logger provides the logger itself and some Adapter to send the logs in several ways., (*1)

Installation

You can install the php component of logbook via git or composer. For both you need composer to get the dependencies installed which are necessary., (*2)

From github

```:bash ## Cloning git repo git clone https://github.com/axel-kummer/logbook-php.git /path/to/checkout ## cd in to path cd /path/to/checkout ## Install dependencies composer install --no-dev, (*3)


### From pakageist ```:bash composer require axel-kummer/logbook-php

Usage

Basic usage., (*4)

First you have to setup the request instance which is used to send the logs., (*5)

```:php //Make a request instance $request = \AxelKummer\LogBook\LoggerUtility::setupRequest( \AxelKummer\LogBook\Request\HttpRequest::class, 'MyApplication', 'myhost' 8080 );, (*6)


You can also add a unique request identifier for all logs within a request. ```:php $request->setRequestId(\AxelKummer\LogBook\LoggerUtility::getRequestId('Prefix))

If it's done you can simply create logger which will have injected the request object., (*7)

```:php //get a logger with injected request instance $logger = \AxelKummer\LogBook\LoggerUtility::getLogger('MyLogger');, (*8)

//Use the logger to send messages to the logbook server $logger->info('My info mesage'); ```, (*9)

You can implement and use your own request class. Your Class have to extend \AxelKummer\LogBook\Request\AbstractRequest and implements the methods sendLog and getUrl, (*10)

The Versions

11/02 2018

dev-master

9999999-dev

PSR compatible logger to send logs from php applications to the logbook server and client.

  Sources   Download

GPLv3 GPL-3.0-or-later

The Requires

 

The Development Requires

by Axel Kummer

04/12 2017

v0.0.3

0.0.3.0

PSR compatible logger to send logs from php applications to the logbook server and client.

  Sources   Download

GPLv3

The Requires

 

The Development Requires

by Axel Kummer

03/12 2017

v0.0.2

0.0.2.0

PSR compatible logger to send logs from php applications to the logbook server and client.

  Sources   Download

GPLv3

The Requires

 

The Development Requires

by Axel Kummer

02/12 2017

v0.0.1

0.0.1.0

PSR compatible logger to send logs from php applications to the logbook server and client.

  Sources   Download

GPLv3

The Requires

 

The Development Requires

by Axel Kummer

27/11 2017

dev-utility

dev-utility

PSR compatible logger to send logs from php applications to the logbook server and client.

  Sources   Download

GPLv3

The Requires

 

The Development Requires

by Axel Kummer

25/11 2017

v0.0.1-BETA

0.0.1.0-beta

PSR compatible logger to send logs from php applications to the logbook server and client.

  Sources   Download

GPLv3

The Requires

 

The Development Requires

by Axel Kummer