-
Notifications
You must be signed in to change notification settings - Fork 2
/
logger.php
26 lines (21 loc) · 1.05 KB
/
logger.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
use function Underpin\underpin;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Add this loader.
add_action( 'underpin/before_setup', function ( $file, $class ) {
require_once( plugin_dir_path( __FILE__ ) . 'lib/loaders/Logger.php' );
require_once( plugin_dir_path( __FILE__ ) . 'lib/abstracts/Event_Type.php' );
require_once( plugin_dir_path( __FILE__ ) . 'lib/factories/Event_Type_Instance.php' );
require_once( plugin_dir_path( __FILE__ ) . 'lib/factories/Basic_Logger_Middleware.php' );
require_once( plugin_dir_path( __FILE__ ) . 'lib/factories/Include_Backtrace_Middleware.php' );
require_once( plugin_dir_path( __FILE__ ) . 'lib/abstracts/Writer.php' );
require_once( plugin_dir_path( __FILE__ ) . 'lib/factories/Basic_Logger.php' );
require_once( plugin_dir_path( __FILE__ ) . 'lib/factories/Log_Item.php' );
require_once( plugin_dir_path( __FILE__ ) . 'lib/factories/Writer_Instance.php' );
// Add the logger.
Underpin\underpin()->get( $file, $class )->loaders()->add( 'logger', [
'registry' => 'Underpin_Logger\Loaders\Logger',
] );
}, 5, 2 );