__( 'AI Request Logging', 'ai' ), 'description' => __( 'Logs AI requests for observability and debugging. View detailed logs under Tools.', 'ai' ), 'category' => Experiment_Category::ADMIN, 'capability' => 'none', ); } /** * {@inheritDoc} */ public function register(): void { $manager = $this->get_manager(); $manager->init(); Logging_Integration::init( $manager ); $controller = new AI_Request_Log_Controller( $manager ); $page = new AI_Request_Log_Page( $manager ); add_action( 'rest_api_init', array( $controller, 'register_routes' ) ); add_action( 'admin_menu', array( $page, 'register_menu' ) ); } /** * Lazily instantiate the log manager. */ private function get_manager(): AI_Request_Log_Manager { if ( null === $this->manager ) { $this->manager = new AI_Request_Log_Manager(); } return $this->manager; } }