:orphan:
# PetscLogEventGetId
Returns the event id when given the event name. 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscLogEventGetId(const char name[], PetscLogEvent *event)
```
Not Collective


## Input Parameter

- ***name  -*** The event name



## Output Parameter

- ***event -*** The event, or -1 if no event with that name exists





## See Also
 [](ch_profiling), `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscLogStageGetId()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/logging/plog.c.html#PetscLogEventGetId">src/sys/logging/plog.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/tutorials/ex3.c.html">src/sys/tutorials/ex3.c</A><BR>


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


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