Skip to main content
`Ctrl`+`K`

# PetscLogStateEventSetActive

Set a logging event as active or inactive during a logging stage.

## Synopsis

    #include "petsclog.h"
    PetscErrorCode PetscLogStateEventSetActive(PetscLogState state, PetscLogStage stage, PetscLogEvent event, PetscBool isActive)

Not collective

## Input Parameters

- state - a `PetscLogState`

- stage - a registered `PetscLogStage`, or `PETSC_DEFAULT` for the current stage

- event - a registered `PetscLogEvent`

- isActive - if `PETSC_FALSE`, `PetscLogStateEventGetActive()` will return `PETSC_FALSE` for this stage and this event

## Note

This is called for the global state (`PetscLogGetState()`) in `PetscLogEventActivate()` and `PetscLogEventDeactivate()`.

## See Also

Profiling, `PetscLogState`, `PetscLogEventGetActive()`, `PetscLogStateGetCurrentStage()`, `PetscLogEventSetActiveAll()`

## Level

developer

## Location

src/sys/logging/state/logstate.c

Index of all Log routines
Table of Contents for all manual pages
Index of all manual pages