HEX
Server:
System: Linux aac286ea486c 5.14.0-687.15.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 11 08:51:45 EDT 2026 x86_64
User: root (0)
PHP: 8.2.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,disk_free_space,diskfreespace
Upload Files
File: /dom877180/wp-content/plugins/gravityview/future/includes/class-gv-logger-wp-action.php
<?php
namespace GV;

/** If this file is called directly, abort. */
if ( ! defined( 'GRAVITYVIEW_DIR' ) ) {
	die();
}

/**
 * The \GV\WP_Action_Logger implementation.
 *
 * @TODO: (Foundation) Deprecate in future versions.
 *
 * Uses the old logging stuff for now.
 */
class WP_Action_Logger extends Logger {

	/**
	 * Logs with an arbitrary level using `do_action` and our
	 *  old action handlers.
	 *
	 * $context['data'] will be passed to the action.
	 *
	 * @param mixed $level The log level.
	 * @param string $message The message to log.
	 * @param array $context The context.
	 *
	 * @return void
	 */
	protected function log( $level, $message, $context ) {
		$backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 3 );
		$location = $this->interpolate( "{class}{type}{function}", $backtrace[2] );
		$message = $this->interpolate( "[$level, $location] $message", $context );

		switch ( $level ):
			case LogLevel::EMERGENCY:
			case LogLevel::ALERT:
			case LogLevel::CRITICAL:
			case LogLevel::ERROR:
				$action = 'error';
				break;
			case LogLevel::WARNING:
			case LogLevel::NOTICE:
			case LogLevel::INFO:
			case LogLevel::DEBUG:
				$action = 'debug';
				break;
		endswitch;

		if ( defined( 'DOING_GRAVITYVIEW_TESTS' ) ) {
			/** Let's make this testable! */
			do_action(
				sprintf( 'gravityview_log_%s_test', $action ),
				$this->interpolate( $message, $context ),
				empty( $context['data'] ) ? array() : $context['data']
			);
		}
		
		do_action(
			sprintf( 'gravityview_log_%s', $action ),
			$this->interpolate( $message, $context ),
			empty( $context['data'] ) ? array() : $context['data']
		);
	}
}