Skip to main content
`Ctrl`+`K`

# PetscLogHandlerStagePush

Begin a new logging stage in a log handler.

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscLogHandlerStagePush(PetscLogHandler h, PetscLogStage stage)

Not collective

## Input Parameters

- h - the `PetscLogHandler`

- stage - a registered `PetscLogStage`

## Notes

Most users will use `PetscLogStagePush()`, which will call this function for all handlers registered with `PetscLogHandlerStart()`.

This function is called right before the stage is pushed for the handler’s `PetscLogState`, so `PetscLogStateGetCurrentStage()` can be used to see what the previous stage was.

## See Also

Profiling, `PetscLogHandler`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscLogHandlerStagePop()`

## Level

developer

## Location

src/sys/logging/handler/interface/loghandler.c

## Implementations

PetscLogHandlerStagePush_Default() in src/sys/logging/handler/impls/default/logdefault.c
PetscLogHandlerStagePush_Nested() in src/sys/logging/handler/impls/nested/lognested.c
PetscLogHandlerStagePush_Perfstubs() in src/sys/logging/handler/impls/perfstubs/logperfstubs.c

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