Data Fields
_PurpleLogLogger Struct Reference

A log logger. More...

`#include <log.h>`

## Data Fields
char * | name
| The logger's name.
char * | id
| an identifier to refer to this logger
void(* | create )(PurpleLog *log)
| This gets called when the log is first created. More...
gsize(* | write )(PurpleLog *log, PurpleMessageFlags type, const char *from, time_t time, const char *message)
| This is used to write to the log file.
void(* | finalize )(PurpleLog *log)
| Called when the log is destroyed.
GList *(* | list )(PurpleLogType type, const char *name, PurpleAccount *account)
| This function returns a sorted GList of available PurpleLogs.
char *(* | read )(PurpleLog *log, PurpleLogReadFlags *flags)
| Given one of the logs returned by the logger's list function, this returns the contents of the log in GtkIMHtml markup.
int(* | size )(PurpleLog *log)
| Given one of the logs returned by the logger's list function, this returns the size of the log in bytes.
int(* | total_size )(PurpleLogType type, const char *name, PurpleAccount *account)
| Returns the total size of all the logs. More...
GList *(* | list_syslog )(PurpleAccount *account)
| This function returns a sorted GList of available system PurpleLogs.
void(* | get_log_sets )(PurpleLogSetCallback cb, GHashTable *sets)
| Adds PurpleLogSets to a GHashTable. More...
gboolean(* | remove )(PurpleLog *log)
gboolean(* | is_deletable )(PurpleLog *log)
void(* | _purple_reserved1 )(void)
void(* | _purple_reserved2 )(void)
void(* | _purple_reserved3 )(void)
void(* | _purple_reserved4 )(void)

## Detailed Description

A log logger.

This struct gets filled out and is included in the PurpleLog. It contains everything needed to write and read from logs.

Definition at line 63 of file log.h.

## Field Documentation

## ◆ create

void(* _PurpleLogLogger::create) (PurpleLog *log)

This gets called when the log is first created.

I don't think this is actually needed.

Definition at line 69 of file log.h.

## ◆ get_log_sets

void(* _PurpleLogLogger::get_log_sets) (PurpleLogSetCallback cb, GHashTable *sets)

Adds PurpleLogSets to a GHashTable.

By passing the data in the PurpleLogSets to list, the caller can get every available PurpleLog from the logger. Loggers using purple_log_common_writer() (or otherwise storing their logs in the same directory structure as the stock loggers) do not need to implement this function.

Loggers which implement this function must create a PurpleLogSet, then call cb with sets and the newly created PurpleLogSet.

Definition at line 107 of file log.h.

## ◆ total_size

int(* _PurpleLogLogger::total_size) (PurpleLogType type, const char *name, PurpleAccount *account)

Returns the total size of all the logs.

If this is undefined a default implementation is used

Definition at line 94 of file log.h.

The documentation for this struct was generated from the following file:

- log.h