# PetscEventPerfLogActivate
Indicates that a particular event should be logged. 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscEventPerfLogActivate(PetscEventPerfLog eventLog, PetscLogEvent event)
```
Not Collective


## Input Parameters

- ***eventLog -*** The `PetscEventPerfLog`
- ***event    -*** The event



## Usage
```none
      PetscEventPerfLogDeactivate(log, VEC_SetValues);
        [code where you do not want to log VecSetValues()]
      PetscEventPerfLogActivate(log, VEC_SetValues);
        [code where you do want to log VecSetValues()]
```



## Notes
The event may be either a pre-defined PETSc event (found in
include/petsclog.h) or an event number obtained with `PetscEventRegLogRegister()`.

This is a low level routine used by the logging functions in PETSc




## See Also
 `PetscEventPerfLogDeactivate()`, `PetscEventPerfLogDeactivatePop()`, `PetscEventPerfLogDeactivatePush()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/logging/utils/eventlog.c.html#PetscEventPerfLogActivate">src/sys/logging/utils/eventlog.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/logging/utils/eventlog.c)


[Index of all Profiling routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
