# PetscLogBegin

Turns on logging of objects and events. This logs flop rates and object creation and should not slow programs down too much. This routine may be called more than once.

### Synopsis

    #include "petsc.h"
    int PetscLogBegin(void)

Collective over PETSC_COMM_WORLD

### Options Database Keys

| -log_summary | - Prints summary of flop and timing information to the screen (for code compiled with PETSC_USE_LOG)
| -log | - Prints detailed log information (for code compiled with PETSC_USE_LOG)

### Usage

          PetscInitialize(...);
          PetscLogBegin();
           ... code ...
          PetscLogPrintSummary(MPI_Comm,filename); or PetscLogDump();
          PetscFinalize();

### Notes

PetscLogPrintSummary(MPI_Comm,filename) or PetscLogDump() actually cause the printing of the logging information.

### Keywords

log, begin

### See Also

PetscLogDump(), PetscLogAllBegin(), PetscLogPrintSummary(), PetscLogTraceBegin()

Level:advanced
Location: src/sys/src/plog/plog.c
Index of all Profiling routines
Table of Contents for all manual pages
Index of all manual pages