SnapdLog: snapd-glib Reference Manual

## SnapdLog SnapdLog — Snap service log entry |

## Functions

const gchar * | snapd_log_get_message ()
const gchar * | snapd_log_get_pid ()
const gchar * | snapd_log_get_sid ()
GDateTime * | snapd_log_get_timestamp ()

## Properties

char * | message | Read / Write / Construct Only
char * | pid | Read / Write / Construct Only
char * | sid | Read / Write / Construct Only
GDateTime * | timestamp | Read / Write / Construct Only

## Types and Values

| SnapdLog

## Object Hierarchy

        GObject
        ╰── SnapdLog

## Includes

    #include <snapd-glib/snapd-glib.h>

## Description

A SnapdLog contains a line from a log for a snap service as returned using `snapd_client_get_logs_sync()`.

## Functions

### snapd_log_get_message ()

    const gchar *
    snapd_log_get_message (SnapdLog *log);

Get the message of this log, e.g. "service started"

#### Parameters

log | a SnapdLog. |

#### Returns

a log message.

Since: 1.64

### snapd_log_get_pid ()

    const gchar *
    snapd_log_get_pid (SnapdLog *log);

Get the process ID of this log, e.g. "1234"

#### Parameters

log | a SnapdLog. |

#### Returns

a process id.

Since: 1.64

### snapd_log_get_sid ()

    const gchar *
    snapd_log_get_sid (SnapdLog *log);

Get the syslog id of this log, e.g. "cups.cups-browsed"

#### Parameters

log | a SnapdLog. |

#### Returns

a syslog id.

Since: 1.64

### snapd_log_get_timestamp ()

    GDateTime *
    snapd_log_get_timestamp (SnapdLog *log);

Get the time this log was generated.

#### Parameters

log | a SnapdLog. |

#### Returns

a timestamp.

Since: 1.64

## Types and Values

### SnapdLog

    typedef struct _SnapdLog SnapdLog;

SnapdLog is an opaque data structure and can only be accessed using the provided functions.

Since: 1.64

## Property Details

### The `“message”` property

      “message”                  char *

Message.

Owner: SnapdLog

Flags: Read / Write / Construct Only

Default value: NULL

### The `“pid”` property

      “pid”                      char *

Process ID.

Owner: SnapdLog

Flags: Read / Write / Construct Only

Default value: NULL

### The `“sid”` property

      “sid”                      char *

Syslog ID.

Owner: SnapdLog

Flags: Read / Write / Construct Only

Default value: NULL

### The `“timestamp”` property

      “timestamp”                GDateTime *

Timestamp.

Owner: SnapdLog

Flags: Read / Write / Construct Only