Infinoted.Log¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Path to the log file |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
This signal is emitted when a new line of log message is written to the log. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Infinoted.Log(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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 withGObject.Object.unref
() when no longer needed.- Return type:
Creates a new
Infinoted.Log
.
- close()¶
Closes a
Infinoted.Log
object opened withInfinoted.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
orNone
) – The path to the log file to write, orNone
.- Raises:
- Returns:
- Return type:
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.
Signal Details¶
- Infinoted.Log.signals.log_message(log, prio, depth, text)¶
- Signal Name:
log-message
- Flags:
- Parameters:
log (
Infinoted.Log
) – The object which received the signalprio (
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.