Log Entries
Each time a Logger method is called, LogKit automatically gathers a variety of details regarding the message, its source, the runtime environment, and the host device. These details are collected into a Log Entry instance.
Developers creating custom Entry formatters may choose to include any number of the available properties in their serialization format.
Log Entry Properties
Every LXLogEntry
contains the following properties:
Property | Type | Description |
---|---|---|
logKitVersion |
String |
The version of the LogKit framework that generated the Entry |
message |
String |
The message provided during the logging call |
userInfo |
[String:AnyObject] |
Additional values to be provided to each Endpoint’s entryFormatter ; always present but may be empty; see here for using userInfo |
logLevel |
String |
The name of the Log Entry’s Priority Level |
timestamp |
Double |
The number of seconds since the Unix epoch |
dateTime |
String |
The timestamp as a string serialized by an Endpoint’s dateFormatter |
functionName |
String |
The name of the function from which the Log Entry was created |
fileName |
String |
The name of the source file from which the Log Entry was created |
filePath |
String |
The absolute path of the source file from which the Log Entry was created |
lineNumber |
Int |
The line number within the source file from which the Log Entry was created |
columnNumber |
Int |
The column number within the source file from which the Log Entry was created |
threadID |
String |
The ID of the thread from which the Log Entry was created |
threadName |
String |
The name of the thread from which the Log Entry was created |
isMainThread |
Bool |
An indicator of whether the Log Entry was created on the main thread |