:orphan:
# PetscInfoGetFile
Gets the `filename` and `FILE` pointer of the file where `PetscInfo()` prints to 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscInfoGetFile(char **filename, FILE **InfoFile)
```
Not Collective; No Fortran Support


## Output Parameters

- ***filename -*** The name of the output file
- ***InfoFile -*** The `FILE` pointer for the output file





## Note
This routine allocates and copies the `filename` so that the `filename` survives `PetscInfoDestroy()`. The user is
therefore responsible for freeing the allocated `filename` pointer afterwards.


## See Also
 [](sec_PetscInfo), `PetscInfo()`, `PetscInfoSetFile()`, `PetscInfoSetFromOptions()`, `PetscInfoDestroy()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/info/verboseinfo.c.html#PetscInfoGetFile">src/sys/info/verboseinfo.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/tutorials/ex7.c.html">src/mat/tutorials/ex7.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/info/verboseinfo.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)  
