Infinoted.Log

g GObject.Object GObject.Object Infinoted.Log Infinoted.Log GObject.Object->Infinoted.Log

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

close ()

open (path)

Virtual Methods

Inherited:

GObject.Object (7)

do_log_message (prio, depth, text)

Properties

Name

Type

Flags

Short Description

file-path

str

r

Path to the log file

Signals

Inherited:

GObject.Object (1)

Name

Short Description

log-message

This signal is emitted when a new line of log message is written to the log.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Infinoted.Log(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Infinoted.LogClass

Infinoted.Log is an opaque data type. You should only access it via the public API functions.

classmethod new()
Returns:

A new Infinoted.Log. Free with GObject.Object.unref() when no longer needed.

Return type:

Infinoted.Log

Creates a new Infinoted.Log.

close()

Closes a Infinoted.Log object opened with Infinoted.Log.open(). After the log was closed it can be opened again with a different file. The log is closed automatically on destruction.

open(path)
Parameters:

path (str or None) – The path to the log file to write, or None.

Raises:

GLib.Error

Returns:

True on success, or False otherwise.

Return type:

bool

Attempts to open the log file at the given path. If the log file could not be opened the function returns False and error is set. If the log file exists already then new log messages will be appended.

If path is None no log file is opened and logging only occurs to stderr.

do_log_message(prio, depth, text) virtual
Parameters:
  • prio (int) –

  • depth (int) –

  • text (str) –

Signal Details

Infinoted.Log.signals.log_message(log, prio, depth, text)
Signal Name:

log-message

Flags:

RUN_FIRST

Parameters:
  • log (Infinoted.Log) – The object which received the signal

  • prio (int) – The priority of the logged message.

  • depth (int) – The recursion depth of the logged message.

  • text (str) – The logged message text.

This signal is emitted when a new line of log message is written to the log.

Property Details

Infinoted.Log.props.file_path
Name:

file-path

Type:

str

Default Value:

None

Flags:

READABLE

Path to the log file