PetscLogStateClassRegister — PETSc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# PetscLogStateClassRegister

Register a class to with a `PetscLogState` used by `PetscLogHandler`s.

## Synopsis

    #include "petsclog.h"
    PetscErrorCode PetscLogStateClassRegister(PetscLogState state, const char name[], PetscClassId id, PetscLogClass *logclass)

Logically collective on `PETSC_COMM_WORLD`

## Input Parameters

- state - a `PetscLogState`

- name - the name of a class registered with `PetscClassIdRegister()`

- id - the `PetscClassId` obtained from `PetscClassIdRegister()`

## Output Parameter

- logclass - a `PetscLogClass` for this class with this state

## Note

Classes are automatically registered with PETSc’s global logging state (`PetscLogGetState()`), so this is only needed for non-global states.

## See Also

Profiling, `PetscLogStateClassGetInfo()`, `PetscLogStateGetClassFromName()`, `PetscLogStateGetClassFromClassId()`

## Level

developer

## Location

src/sys/logging/state/logstate.c

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