PHP code example of morningtrain / wp-logger

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

    

morningtrain / wp-logger example snippets


\Morningtrain\WP\Logger\Logger::initializeMigration()

\Morningtrain\WP\Logger\Logger::registerLoggers(
    'logger', 
    [
        // Loggers
    ]
);

\Morningtrain\WP\Logger\Logger::databaseLogger()

\Morningtrain\WP\Logger\Logger::fileLogger($filename)

\Morningtrain\WP\Logger\Logger::mailLogger($emails)

\Morningtrain\WP\Logger\Logger::rayLogger()

\Psr\Log\LogLevel::EMERGENCY
\Psr\Log\LogLevel::ALERT
\Psr\Log\LogLevel::CRITICAL
\Psr\Log\LogLevel::ERROR
\Psr\Log\LogLevel::WARNING
\Psr\Log\LogLevel::NOTICE
\Psr\Log\LogLevel::INFO
\Psr\Log\LogLevel::DEBUG

\Morningtrain\WP\Logger\Logger::getLogger('logger')
    ->emergency()
    ->alert()
    ->critical()
    ->error()
    ->warning()
    ->notice()
    ->info()
    ->debug()