# 🌐 Global events

As mentioned in the Services page, services provide several events that you can subscribe to in order to get notified about various stages of the network checking process. However, sometimes you might want to listen for these events globally, without needing to access a specific service instance. This is where the global events come in handy.

You can use and subscribe to the Events instance (IEazyNetCheckerEvents) to listen for global events related to network checks (and more). As always, you can access the global events instance via the static EazyNetChecker.GlobalEvents property, or via a reference to the IEazyNetCheckerEvents instance if you are using dependency injection.

var globalEvents = EazyNetChecker.GlobalEvents;
globalEvents.OnSystemInitialized += () =>
{
    Debug.Log("EazyNetChecker system has been initialized");
};

globalEvents.OnCheckStarted += (service) =>
{
    Debug.Log($"A network check has started by service '{service.Label}'");
};

globalEvents.OnCheckCompleted += (service, result) =>
{
    Debug.Log($"A network check has completed by service '{service.Label}' - Status: {result.Status}");
};

globalEvents.OnRunningStateUpdated += (service) =>
{
    Debug.Log($"Service '{service.Label}' running state updated. IsRunning: {service.IsRunning}");
};

globalEvents.OnNetStatusChanged += (service, newStatus) =>
{
    Debug.Log($"Service '{service.Label}' status changed to: {newStatus}");
};

globalEvents.OnCheckCancelled += (service) =>
{
    Debug.Log($"A network check was cancelled by service '{service.Label}'");
};

globalEvents.OnServiceCreated += (service) =>
{
    Debug.Log($"A new NetCheckService was created: '{service.Label}'");
};

globalEvents.OnServiceTeardown += (service) =>
{
    Debug.Log($"A NetCheckService was disposed: '{service.Label}'");
};