PetscLogHandlerSetLogObjects — PETSc 3.22.5 documentation

Skip to main content
`Ctrl`+`K`

# PetscLogHandlerSetLogObjects

Determines whether objects are logged for a log handler.

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscLogHandlerSetLogObjects(PetscLogHandler handler, PetscBool flag)

Not Collective

## Input Parameters

- handler - a `PetscLogHandler`

- flag - `PETSC_TRUE` if objects are to be logged (ignored if `handler` does not log objects)

## Notes

The default log handler `PETSCLOGHANDLERDEFAULT` implements this function, but others generally do not. You can use `PetscLogSetLogObjects()` to call this function for the default log handler that is connected to the global logging state (`PetscLogGetState()`).

Logging of objects continues to consume more memory as the program runs. Long running programs should consider turning this feature off.

## See Also

Profiling, `PetscLogSetLogObjects()`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscLogGetDefaultHandler()`

## Level

developer

## Location

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

## Implementations

PetscLogHandlerSetLogObjects_Default() in src/sys/logging/handler/impls/default/logdefault.c

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