WP MyLogger

This plugin use Apache log4php™ libary for create custom loggers on your file system or mail account. Is possible specify the type (rolling, daily),

Author:paniko (profile at wordpress.org)
WordPress version required:3.5.1
WordPress version tested:3.6.1
Plugin version:0.0
Added to WordPress repository:13-03-2015
Last updated:16-03-2015
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:
Total downloads:757
Active installs:10+
plugin download
Click to start download

To use the custom appenders, add this code in your init plugin for example: Choose among appenders (LoggerAppenderDailyFile, LoggerAppenderRollingFile, LoggerAppenderFile, LoggerAppenderMail, LoggerAppenderMailEvent), for each type you must
specify the relative parameters, how to official documentation of log4php.

  • For rolling file appenders:

    ‘1MB’, My_Logger::ROLLING_APPENDER => true, My_Logger::ROLLING_MAX_BACKUP_INDEX => 5 ); $mylogger = My_Logger::get_instance(“”, My_Logger::ROLLING, $parameters); $this->logger = $mylogger->getLogger(); //for debug you add: $this->logger->debug($parameters); $this->logger->debug(“test”); ?>

  • For mail appender: ”, My_Logger::MAIL_TO => ”, My_Logger::MAIL_SUBJECT => ”, My_Logger::THRESHOLD => My_Logger::LEVEL_DEBUG//6: Sets the root logger level to DEBUG. This means that logging requests with the level lower than DEBUG will not be logged by the root logger. );
    $mylogger = My_Logger::get_instance(“”, My_Logger::MAIL, $parameters); ?>

** SET Logger threshold ** A level describes the severity of a logging message. There are six levels, show here in descending order of severity. You can set level of logger, add the parameter:

  • FATAL Highest Very severe error events that will presumably lead the application to abort.
  • ERROR … Error events that might still allow the application to continue running.
  • WARN … Potentially harmful situations which still allow the application to continue running.
  • INFO … Informational messages that highlight the progress of the application at coarse-grained level.
  • DEBUG … Fine-grained informational events that are most useful to debug an application.
  • TRACE Lowest Finest-grained informational events.

If do you want put a logger in frontend, add this code in template script: ‘1MB’, My_Logger::ROLLING_APPENDER => true, My_Logger::ROLLING_MAX_BACKUP_INDEX => 5, My_Logger::THRESHOLD => My_Logger::LEVEL_DEBUG );
$mylogger = new My_Logger(“”, My_Logger::ROLLING, $parameters);
$logger = $mylogger->getLogger(); $logger->debug(“test my logger”); ?>

For more info read the API documents of log4php:Apache Log4php Docs

** Configuration ** You can set configuration path file to export your logger, in the plugin’s settings.