PHP code example of axel-kummer / logbook-php

1. Go to this page and download the library: Download axel-kummer/logbook-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

axel-kummer / logbook-php example snippets

:bash
    composer 
:php
//Make a request instance
$request = \AxelKummer\LogBook\LoggerUtility::setupRequest(
    \AxelKummer\LogBook\Request\HttpRequest::class,
    'MyApplication',
    'myhost'
    8080
);
:php
$request->setRequestId(\AxelKummer\LogBook\LoggerUtility::getRequestId('Prefix))
:php
//get a logger with injected request instance
$logger = \AxelKummer\LogBook\LoggerUtility::getLogger('MyLogger');

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