Graphiteng
Enumerations | Functions
Log.h File Reference
#include <graphite2/Types.h>
#include <graphite2/Font.h>
#include <stdio.h>

Go to the source code of this file.

Enumerations

enum  GrLogMask {
  GRLOG_NONE = 0x0 , GRLOG_FACE = 0x01 , GRLOG_SEGMENT = 0x02 , GRLOG_PASS = 0x04 ,
  GRLOG_CACHE = 0x08 , GRLOG_OPCODE = 0x80 , GRLOG_ALL = 0xFF
}
 deprecated mechanism that doesn't do anything now. More...
 

Functions

GR2_API bool gr_start_logging (gr_face *face, const char *log_path)
 Start logging all segment creation and updates on the provided face. More...
 
GR2_API void gr_stop_logging (gr_face *face)
 Stop logging on the given face. More...
 
GR2_API bool graphite_start_logging (FILE *logFile, GrLogMask mask)
 Start logging to a FILE object. More...
 
GR2_API void graphite_stop_logging ()
 Stop logging to a FILE object. More...
 

Enumeration Type Documentation

◆ GrLogMask

enum GrLogMask

deprecated mechanism that doesn't do anything now.

Enumerator
GRLOG_NONE 
GRLOG_FACE 
GRLOG_SEGMENT 
GRLOG_PASS 
GRLOG_CACHE 
GRLOG_OPCODE 
GRLOG_ALL 

Function Documentation

◆ gr_start_logging()

GR2_API bool gr_start_logging ( gr_face face,
const char *  log_path 
)

Start logging all segment creation and updates on the provided face.

This is logged to a JSON file, see "Segment JSON Schema.txt" for a precise definition of the file

Returns
true if the file was successfully created and logging is correctly initialised.
Parameters
facethe gr_face whose segments you want to log to the given file
log_patha utf8 encoded file name and path to log to.

◆ gr_stop_logging()

GR2_API void gr_stop_logging ( gr_face face)

Stop logging on the given face.

This will close the log file created by gr_start_logging.

Parameters
facethe gr_face whose segments you want to stop logging

◆ graphite_start_logging()

GR2_API bool graphite_start_logging ( FILE *  logFile,
GrLogMask  mask 
)

Start logging to a FILE object.

This function is deprecated as of 1.2.0, use the _face versions instead.

Returns
True on success
Parameters
logfileFILE reference to output logging to
maskWhat aspects of logging to report (ignored)

◆ graphite_stop_logging()

GR2_API void graphite_stop_logging ( )

Stop logging to a FILE object.

This function is deprecated as of 1.2.0, use the _face versions instead.