Skip to main content
`Ctrl`+`K`

# PetscLogHandlerSetState

Set the logging state that provides the stream of events and stages for a log handler.

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscLogHandlerSetState(PetscLogHandler h, PetscLogState state)

Logically collective

## Input Parameters

- h - the `PetscLogHandler`

- state - the `PetscLogState`

## Note

Most users well not need to set a state explicitly: the global logging state (`PetscLogGetState()`) is set when calling `PetscLogHandlerStart()`

## See Also

Profiling, `PetscLogHandler`, `PetscLogState`, `PetscLogEventBegin()`, `PetscLogHandlerStart()`

## Level

developer

## Location

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

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