class-wc-log-handler-interface.php 762 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Log Handler Interface
  4. *
  5. * @version 3.3.0
  6. * @package WooCommerce/Interface
  7. */
  8. if ( ! defined( 'ABSPATH' ) ) {
  9. exit; // Exit if accessed directly.
  10. }
  11. /**
  12. * WC Log Handler Interface
  13. *
  14. * Functions that must be defined to correctly fulfill log handler API.
  15. *
  16. * @version 3.3.0
  17. */
  18. interface WC_Log_Handler_Interface {
  19. /**
  20. * Handle a log entry.
  21. *
  22. * @param int $timestamp Log timestamp.
  23. * @param string $level emergency|alert|critical|error|warning|notice|info|debug.
  24. * @param string $message Log message.
  25. * @param array $context Additional information for log handlers.
  26. *
  27. * @return bool False if value was not handled and true if value was handled.
  28. */
  29. public function handle( $timestamp, $level, $message, $context );
  30. }