Functions

get_version ()

initialize ()

log_get_level ()

log_set_level (level)

log_use_glib_logging ()

Details

GExiv2.get_version()[source]
Returns:

The gexiv2 library’s version number as a formatted decimal XXYYZZ, where XX is the major version, YY is the minor version, and ZZ is the micro version. For example, version 0.6.1 will be returned as 000601.

Return type:

int

GExiv2.initialize()[source]
Returns:

True if initialized. If False, GExiv2 should not be used (unable to initialize properly).

Return type:

bool

gexiv2 requires initialization before its methods are used. In particular, this call must be made in a thread-safe fashion. Best practice is to call from the application’s main thread and not to use any Gexiv2 code until it has returned.

GExiv2.log_get_level()[source]
Returns:

The current GExiv2.LogLevel. Messages below this level will not be logged.

Return type:

GExiv2.LogLevel

GExiv2.log_set_level(level)[source]
Parameters:

level (GExiv2.LogLevel) – The GExiv2.LogLevel gexiv2 should respect.

Log messages below this level will not be logged.

GExiv2.log_use_glib_logging()[source]

When called, gexiv2 will install it’s own GExiv2.LogHandler which redirects all Exiv2 and gexiv2 log messages to GLib’s logging calls (g_debug(), g_message(), g_warning(), and g_critical() for the respective GExiv2.LogLevel value). GExiv2.LogLevel.MUTE logs are dropped.

One advantage to using this is that GLib’s logging control and handlers can be used rather than GExiv2’s ad hoc scheme. It also means an application can use GLib logging and have all its messages routed through the same calls.