:orphan:
# PetscLogEventSetError
Set the nth error associated with a numerical problem associated with this event
## Synopsis
```
#include "petscsys.h"
PetscErrorCode PetscLogEventSetError(PetscLogEvent event, PetscInt n, PetscLogDouble error)
```
Not Collective
## Input Parameters
- ***event -*** The event id to log
- ***n -*** The error index, in [0, 8)
- ***error -*** The error
## Options Database Key
- ***-log_view -*** Activates log summary
## Notes
This is to enable logging of convergence, and enable users to interpret the errors as they wish. For example,
as different norms, or as errors for different fields
This is a low level routine used by the logging functions in PETSc
## See Also
`PetscLogEventSetDof()`, `PetscEventRegLogRegister()`, `PetscStageLogGetEventLog()`
## Level
developer
## Location
src/sys/logging/utils/eventlog.c
## Examples
src/snes/tutorials/ex5.c
src/snes/tutorials/ex55.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/logging/utils/eventlog.c)
[Index of all Profiling routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)