Skip to main content
`Ctrl`+`K`

# PetscLogStateGetCurrentStage

Get the last stage that was started

## Synopsis

    #include "petsclog.h"
    PetscErrorCode PetscLogStateGetCurrentStage(PetscLogState state, PetscLogStage *current)

Not collective

## Input Parameter

- state - a `PetscLogState`

## Output Parameter

- current - the last `PetscLogStage` started with `PetscLogStateStagePop()`

## Note

This is called for the global state (`PetscLogGetState()`) in `PetscLogGetCurrentStage()`.

## See Also

Profiling, `PetscLogState`, `PetscLogStateStageRegister()`, `PetscLogStateStagePush()`, `PetscLogStateStagePop()`

## Level

developer

## Location

src/sys/logging/state/logstate.c

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