:orphan:
# PetscStageLogGetStage
This function returns the stage id given the stage name. 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscStageLogGetStage(PetscStageLog stageLog, const char name[], PetscLogStage *stage)
```
Not Collective


## Input Parameters

- ***stageLog -*** The `PetscStageLog`
- ***name     -*** The stage name



## Output Parameter

- ***stage    -*** The stage id, or -1 if it does not exist





## See Also
 `PetscStageLogGetCurrent()`, `PetscStageLogRegister()`, `PetscLogGetStageLog()`

## Level
developer

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/logging/utils/stagelog.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)  
