PHP code example of pleonovich / log

1. Go to this page and download the library: Download pleonovich/log 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/ */

    

pleonovich / log example snippets


// Description:
void setPath ( string $path )

// example:
LOG::setPath('Here path to log folder');

// Description:
void clear ()

// example:
LOG::clear();

// Description:
void write ( string|array|boolean|int|null $text [, string $title = null [, string $filename = null ]] )

// example:
LOG::write('Here is your log information','Log title', 'test');

// result in file - 25.06.2017.test.log.txt
// [2017.06.25][06:50:30][Log title] string(28) "Here is your log information"

// Description:
void writeError ( string $text [, string $title = null ] )

// example:
LOG::writeError('Here is your error log information','Error log title');

// result in file - 25.06.2017.error.log.txt
// [2017.06.25][07:22:01][Error log title] string(34) "Here is your error log information"

// Description:
void writeException ( Exception $e [, string $title = null ] )

// example:
LOG::writeException('Here is exception object','Exception information');

// Description:
void border ( [ string $title = 'BORDER' ] )

// example:
LOG::border('Border title');
// result in file - 25.06.2017.log.txt
//////////Border title////////////////////////////////////////////////////////////////////////////////