Php/docs/function.mongodb.driver.monitoring.addsubscriber
来自菜鸟教程
MongoDB\Driver\Monitoring\addSubscriber
(mongodb >=1.3.0)
MongoDB\Driver\Monitoring\addSubscriber — Registers a new monitoring event subscriber
说明
MongoDB\Driver\Monitoring\addSubscriber
( MongoDB\Driver\Monitoring\Subscriber $subscriber
) : void
Registers a new monitoring event subscriber with the driver. Registered subscribers will be notified of monitoring events through specific methods.
Note:
If the object is already registered, this function is a no-op.
参数
subscriber
(MongoDB\Driver\Monitoring\Subscriber)- A monitoring event subscriber object to register.
返回值
没有返回值。
参见
- MongoDB\Driver\Monitoring\Subscriber
- MongoDB\Driver\Monitoring\CommandSubscriber
- MongoDB\Driver\Monitoring\removeSubscriber() - Unregisters an existing monitoring event subscriber
- Application Performance Monitoring (APM)