# PetscLogSetThreshold
Set the threshold time for logging the events; this is a percentage out of 100, so 1. means any event that takes 1 or more percent of the time. 
## Synopsis
```
#include "petsclog.h" 
PetscErrorCode PetscLogSetThreshold(PetscLogDouble newThresh, PetscLogDouble *oldThresh)
```
Logically Collective over `PETSC_COMM_WORLD`


## Input Parameter

- ***newThresh -*** the threshold to use



## Output Parameter

- ***oldThresh -*** the previously set threshold value



## Options Database Keys

- ***-log_view :filename.xml:ascii_xml -*** Prints an XML summary of flop and timing information to the file



## Usage
```none
      PetscInitialize(...);
      PetscLogNestedBegin();
      PetscLogSetThreshold(0.1,&oldthresh);
       ... code ...
      PetscLogView(viewer);
      PetscFinalize();
```





## See Also
 `PetscLogDump()`, `PetscLogAllBegin()`, `PetscLogView()`, `PetscLogTraceBegin()`, `PetscLogDefaultBegin()`,
`PetscLogNestedBegin()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/logging/xmllogevent.c.html#PetscLogSetThreshold">src/sys/logging/xmllogevent.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex1f.F90.html">src/snes/tutorials/ex1f.F90.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/logging/xmllogevent.c)


[Index of all Profiling routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
