# PetscLogStageGetId
Returns the stage id when given the stage name. 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscLogStageGetId(const char name[], PetscLogStage *stage)
```
Not Collective


## Input Parameter

- ***name  -*** The stage name



## Output Parameter

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





## See Also
 [](ch_profiling), `PetscLogStageRegister()`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscPreLoadBegin()`, `PetscPreLoadEnd()`, `PetscPreLoadStage()`

## Level
intermediate

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


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
