Skip to main content
`Ctrl`+`K`

# PetscLogStageRegister

Attaches a character string name to a logging stage.

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscLogStageRegister(const char sname[], PetscLogStage *stage)

Not Collective

## Input Parameter

- sname - The name to associate with that stage

## Output Parameter

- stage - The stage number or -1 if logging is not active (`PetscLogIsActive()`).

## See Also

Profiling, `PetscLogStagePush()`, `PetscLogStagePop()`

## Level

intermediate

## Location

src/sys/logging/plog.c

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