PetscLogHandlerCreateLegacy#
Create a PetscLogHandler from callbacks matching PETSc’s legacy log handler callbacks
Synopsis#
PetscErrorCode PetscLogHandlerCreateLegacy(MPI_Comm comm, PetscErrorCode (*PetscLogPLB)(PetscLogEvent e, int _i, PetscObject o1, PetscObject o2, PetscObject o3, PetscObject o4), PetscErrorCode (*PetscLogPLE)(PetscLogEvent e, int _i, PetscObject o1, PetscObject o2, PetscObject o3, PetscObject o4), PetscErrorCode (*PetscLogPHC)(PetscObject o), PetscErrorCode (*PetscLogPHD)(PetscObject o), PetscLogHandler *handler)
Collective
Input Parameters#
- comm - an MPI communicator 
- PetscLogPLB - a function to call during - PetscLogHandlerEventBegin()(or- NULL)
- PetscLogPLE - a function to call during - PetscLogHandlerEventEnd()(or- NULL)
- PetscLogPHC - a function to call during - PetscLogHandlerObjectCreate()(or- NULL)
- PetscLogPHD - a function to call during - PetscLogHandlerObjectDestroy()(or- NULL)
Output Parameter#
- handler - a - PetscLogHandler
Calling sequence of PetscLogPLB#
- e - a - PetscLogEventthat is beginning
- _i - deprecated, unused 
- o1 - a - PetscObjectassociated with- e(or- NULL)
- o2 - a - PetscObjectassociated with- e(or- NULL)
- o3 - a - PetscObjectassociated with- e(or- NULL)
- o4 - a - PetscObjectassociated with- e(or- NULL)
Calling sequence of PetscLogPLE#
- e - a - PetscLogEventthat is beginning
- _i - deprecated, unused 
- o1 - a - PetscObjectassociated with- e(or- NULL)
- o2 - a - PetscObjectassociated with- e(or- NULL)
- o3 - a - PetscObjectassociated with- e(or- NULL)
- o4 - a - PetscObjectassociated with- e(or- NULL)
Calling sequence of PetscLogPHC#
- o - a - PetscObjectthat has just been created
Calling sequence of PetscLogPHD#
- o - a - PetscObjectthat is about to be destroyed
Notes#
This is for transitioning from the deprecated function PetscLogSet() and should not be used in new code.
PetscLogLegacyCallbacksBegin(), which calls this function, creates and starts (PetscLogHandlerStart()) a log handler,
should be used in almost all cases.
See Also#
Level#
developer
Location#
src/sys/logging/handler/impls/legacy/loglegacy.c
Index of all Profiling routines
Table of Contents for all manual pages
Index of all manual pages