DLog is the development logger for Swift that supports emoji and colored text output, format and privacy options, pipelines, filtering, scopes, intervals, stack backtrace and more.
Log a debug message to help debug problems during the development:
let session = URLSession(configuration: .default)
session.dataTask(with: URL(string: "https://apple.com")!) { data, response, error in
guard let http = response as? HTTPURLResponse else { return }
let text = HTTPURLResponse.localizedString(forStatusCode: http.statusCode)
logger.debug("\(http.url!.absoluteString): \(http.statusCode) - \(text)")
}
.resume()
Outputs:
• 23:49:16.562 [DLOG] [DEBUG] <DLog.swift:17> https://www.apple.com/: 200 - no error
warning
Log a warning message that occurred during the execution of your code.
logger.warning("No Internet connection.")
Outputs:
• 23:49:55.757 [DLOG] [WARNING] <DLog.swift:12> No Internet connection.
error
Log an error that occurred during the execution of your code.
let fromURL = URL(fileURLWithPath: "source.txt")
let toURL = URL(fileURLWithPath: "destination.txt")
do {
try FileManager.default.moveItem(at: fromURL, to: toURL)
}
catch {
logger.error("\(error.localizedDescription)")
}
Outputs:
• 23:50:39.560 [DLOG] [ERROR] <DLog.swift:18> “source.txt” couldn’t be moved to “Macintosh HD” because either the former doesn’t exist, or the folder containing the latter doesn’t exist.
assert
Sanity check and log a message (if it is provided) when a condition is false.
let user = "John"
let password = ""
logger.assert(user.isEmpty == false, "User is empty")
logger.assert(password.isEmpty == false)
logger.assert(password.isEmpty == false, "Password is empty")
Because users can have access to log messages that your app generates, use the private privacy options to hide potentially sensitive information. For example, you might use it to hide or mask an account information or personal data.
The standard private option redacts a value with the generic string.
let phoneNumber = "+11234567890"
logger.log("\(phoneNumber, privacy: .private)")
NOTE: Messages with private option are interpreted as public in debugging (XCode debugger is attached). If you want to disable this feature in debugging you should set auto parameter to false, e.g.: logger.log("\(phoneNumber, privacy: .private(mask: .custom(value: "<private>"), auto: false))")
private(mask: .hash)
The mask option to redact a value with its hash value in the logs.
scope provides a mechanism for grouping work that’s done in your program, so that can see all log messages related to a defined scope of your code in a tree view:
logger.scope("Loading") { scope in
if let path = Bundle.main.path(forResource: "data", ofType: "json") {
scope.info("File: \(path)")
if let data = try? String(contentsOfFile: path) {
scope.debug("Loaded \(data.count) bytes")
}
}
}
NOTE: To pin your messages to a scope you should use the provided scope instance to call log, trace, etc.
duration - The current time duration of the current interval.
sorting - Name of the interval.
You can also get the current interval’s duration and all its statistics programatically:
let interval = logger.interval("signpost") {
...
}
print(interval.duration) // The current duration
print(interval.statistics.count) // Total count of calls
print(interval.statistics.total) // Total time of all durations
print(interval.statistics.min) // Min duration
print(interval.statistics.max) // Max duration
print(interval.statistics.average) // Average duraton
To measure asynchronous tasks you can use begin and end methods:
let logger = DLog()
let interval = logger.interval("load")
interval.begin()
let url = URL(string: "https://bitmovin-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8")!
let asset = AVURLAsset(url: url)
asset.loadValuesAsynchronously(forKeys: ["duration"]) {
let status = asset.statusOfValue(forKey: "duration", error: nil)
if status == .loaded {
logger.debug("duration: \(asset.duration.seconds)")
}
interval.end()
}
You can define category name to differentiate unique areas and parts of your app and DLog uses this value to categorize and filter related log messages. For example, you might define separate strings for your app’s user interface, data model, and networking code.
let logger = DLog()
let tableLogger = logger["TABLE"]
let netLogger = logger["NET"]
logger.debug("Refresh")
netLogger.debug("Successfully fetched recordings.")
tableLogger.debug("Updating with network response.")
You can apply your specific configuration to your category to change the default log messages appearance, visible info and details etc. (See more: Configuration )
For instance:
let logger = DLog()
var config = LogConfig()
config.sign = ">"
config.options = [.sign, .time, .category, .type]
config.traceConfig.options = [.queue]
let netLogger = logger.category(name: "NET", config: config)
logger.trace("default")
netLogger.trace("net")
In its most basic usage, metadata is useful for grouping log messages about the same subject together. For example, you can set the request ID of an HTTP request as metadata, and all the log lines about that HTTP request would show that request ID.
Logger metadata is a keyword list stored in the dictionary and it can be applied to the logger on creation or changed with its instance later, e.g.:
Text is a source output that generates text representation of log messages. It doesn’t deliver text to any target outputs (stdout, file etc.) and usually other outputs use it.
It supports thee styles:
.plain - universal plain text
.emoji - text with type icons for info, debug etc. (useful for XCode console)
.colored - colored text with ANSI escape codes (useful for Terminal and files)
let outputs = [
"Plain" : Text(style: .plain),
"Emoji" : Text(style: .emoji),
"Colored" : Text(style: .colored),
]
for (name, output) in outputs {
let logger = DLog(output)
print(name)
print(logger.info("info")!)
print(logger.error("error")!)
print(logger.fault("fatal")!)
print("")
}
File is a target output that writes text messages to a file by a provided path:
let file = File(path: "/users/user/dlog.txt")
let logger = DLog(file)
logger.info("It's a file")
By default File output clears content of a opened file but if you want to append data to the existed file you should set append parameter to true:
let file = File(path: "/users/user/dlog.txt", append: true)
You can also use .file shortcut to create the output:
let logger = DLog(.file("dlog.txt"))
File output uses Text(style: .plain) as a source by default but you can change it:
let file = File(path: "/users/user/dlog.txt", source: .textColored)
let logger = DLog(file)
logger.scope("File") { scope in
scope.info("It's a file")
}
File “dlog.txt”:
OSLog
OSLog is a target output that writes messages to the Unified Logging System (https://developer.apple.com/documentation/os/logging) that captures telemetry from your app for debugging and performance analysis and then you can use various tools to retrieve log information such as: Console and Instruments apps, command line tool log etc.
To create OSLog you can use subsystem strings that identify major functional areas of your app, and you specify them in reverse DNS notation—for example, com.your_company.your_subsystem_name. OSLog uses com.dlog.logger subsystem by default:
let output1 = OSLog() // subsystem = "com.dlog.logger"
let output2 = OSLog(subsystem: "com.company.app") // subsystem = "com.company.app"
You can also use .oslog shortcut to create the output:
let logger1 = DLog(.oslog)
let logger2 = DLog(.oslog("com.company.app"))
All DLog’s methods map to the system logger ones with appropriate log levels e.g.:
DLog’s scopes map to the system logger activities:
let logger = DLog(.oslog)
logger.scope("Loading") { scope1 in
scope1.info("start")
logger.scope("Parsing") { scope2 in
scope2.debug("Parsed 1000 items")
}
scope1.info("finish")
}
Console.app with activities:
DLog’s intervals map to the system logger signposts:
let logger = DLog(.oslog)
for _ in 0..<10 {
logger.interval("Sorting") {
let delay = [0.1, 0.2, 0.3].randomElement()!
Thread.sleep(forTimeInterval: delay)
logger.debug("Sorted")
}
}
Instruments.app with signposts:
Net
Net is a target output that sends log messages to NetConsole service that can be run from a command line on your machine. The service is provided as executable inside DLog package and to start it you should run sh NetConsole.command (or just click on NetConsole.command file) inside the package’s folder and then the service starts listening for incoming messages:
$ sh NetConsole.command # or 'xcrun --sdk macosx swift run'
> [39/39] Linking NetConsole
> NetConsole for DLog v.1.0
Then the output connects and sends your log messages to NetConsole:
let logger = DLog(Net())
logger.scope("Main") { scope1 in
scope1.trace("Start")
logger.scope("Subtask") { scope2 in
scope2.info("Validation")
scope2.error("Token is invalid")
scope2.debug("Retry")
}
scope1.info("Close connection")
}
iOS 14: Don’t forget to make next changes in your Info.plist to support Bonjour:
<key>NSLocalNetworkUsageDescription</key>
<string>Looking for local tcp Bonjour service</string>
<key>NSBonjourServices</key>
<array>
<string>_dlog._tcp</string>
</array>
Terminal:
By default Net uses Text(style: .colored) output as a source but you can set other:
let logger = DLog(Net(source: .textEmoji))
And you can also use .net shortcut to create the output for the logger.
let logger = DLog(.net)
To connect to a specific instance of the service in your network you should provide an unique name to both NetConsole and Net output (“DLog” name is used by default).
To run the NetConsole with a specific name run next command:
sh NetConsole.command -n "MyLogger" # or 'xcrun --sdk macosx swift run NetConsole -n "MyLogger"'
In swift code you should set the same name:
let logger = DLog(.net("MyLogger"))
More params of NetConsole you can look at help:
sh NetConsole.command --help # or 'xcrun --sdk macosx swift run NetConsole --help'
OVERVIEW: NetConsole for DLog v.1.0
USAGE: net-console [--name <name>] [--auto-clear] [--debug]
OPTIONS:
-n, --name <name> The name by which the service is identified to the network. The name must be unique and by default it equals
"DLog". If you pass the empty string (""), the system automatically advertises your service using the computer
name as the service name.
-a, --auto-clear Clear a terminal on new connection.
-d, --debug Enable debug messages.
-h, --help Show help information.
Pipeline
As described above File, Net and Standard outputs have source parameter in their initializers to set a source output that is very useful if we want to change an output by default:
let std = Standard(stream: .out, source: .textEmoji)
let logger = DLog(std)
Actually any output has source property:
let std = Standard()
std.source = .textEmoji
let logger = DLog(std)
So that it’s possible to make a linked list of outputs:
// Text
let text: LogOutput = .textEmoji
// Standard
let std = Standard()
std.source = text
// File
let file = File(path: "dlog.txt")
file.source = std
let logger = DLog(file)
Where text is a source for std and std is a source for file: text –> std –> file, and now each text message will be sent to both std and file outputs consecutive.
Lets rewrite this shorter:
let logger = DLog(.textEmoji => .stdout => .file("dlog.txt"))
Where => is pipeline operator which defines a combined output from two outputs where the first one is a source and second is a target. So from example above emoji text messages will be written twice: first to standard output and then to the file.
You can combine any needed outputs together and create a final chained output from multiple outputs and your messages will be forwarded to all of them one by one:
// All log messages will be written:
// 1) as plain text to stdout
// 2) as colored text (with escape codes) to the file
let logger = DLog(.textPlain => .stdout => .textColored => .file(path))
Filter
Filter or .filter represents a pipe output that can filter log messages by next available fields: time, category, type, fileName, funcName, line, text and scope. You can inject it to your pipeline where you need to log specific data only.
Examples:
Log messages to stardard output with ‘NET’ category only
let logger = DLog(.textPlain => .filter { $0.category == "NET" } => .stdout)
let netLogger = logger["NET"]
logger.info("info")
netLogger.info("info")
It is the shared disabled logger constant that doesn’t emit any log message and it’s very useful when you want to turn off the logger for some build configuration, preference, condition etc.
// Logging is enabled for `Debug` build configuration only
#if DEBUG
let logger = DLog(.textPlain => .file(path))
#else
let logger = DLog.disabled
#endif
The same can be done for disabling unnecessary log categories without commenting or deleting the logger’s functions:
The disabled logger continue running your code inside scopes and intervals:
let logger = DLog.disabled
logger.log("start")
logger.scope("scope") { scope in
scope.debug("debug")
print("scope code")
}
logger.interval("signpost") {
logger.info("info")
print("signpost code")
}
logger.log("finish")
Outputs:
scope code
signpost code
Configuration
You can customize the logger’s output by setting which info from the logger should be used. LogConfig is a root struct to configure the logger which contains common settings for log messages.
For instance you can change the default view of log messages which includes a start sign, category, log type and location:
let logger = DLog()
logger.info("Info message")
Outputs:
• 23:53:16.116 [DLOG] [INFO] <DLog.swift:12> Info message
To new appearance that includes your start sign and timestamp only:
var config = LogConfig()
config.sign = ">"
config.options = [.sign, .time]
let logger = DLog(config: config)
logger.info("Info message")
Outputs:
> 00:01:24.380 Info message
TraceConfig
It contains configuration values regarding to the trace method which includes trace view options, thread and stack configurations.
By default trace method uses .compact view option to produce information about the current function name and thread info:
let logger = DLog()
func doTest() {
logger.trace()
}
doTest()
The trace method can output the call stack backtrace of the current thread at the moment this method was called. To enable this feature you should configure stack view options, style and depth with stackConfig property:
NOTE: A full call stack backtrace is available in Debug mode only.
IntervalConfig
You can change the view options of interval statistics with intervalConfig property of LogConfig to show needed information such as: .count, .min, .max etc. Or you can use .all to output all parameters.
var config = LogConfig()
config.intervalConfig.options = [.all]
let logger = DLog(config: config)
logger.interval("signpost") {
Thread.sleep(forTimeInterval: 3)
}
DLog exposes all functionality to Objective-C via DLogObjC library and it’s very useful in projects with mixed code so you can log messages, create scopes and intervals, share global loggers etc.
DLog
DLog is the development logger for Swift that supports emoji and colored text output, format and privacy options, pipelines, filtering, scopes, intervals, stack backtrace and more.
Getting started
By default
DLogprovides basic text console output:Outputs:
Where:
•- start sign (useful for filtering)23:59:11.710- timestamp (HH:mm:ss.SSS)[DLOG]- category tag (‘DLOG’ by default)[LOG]- log type tag (‘LOG’, ‘TRACE’, ‘DEBUG’ etc.)<DLog.swift:12>- location (file:line)Hello DLog!- messageYou can apply privacy and format options to your logged values:
Outputs:
DLogoutputs text logs tostdoutby default but you can use the other outputs such as:stderr, filter, file, OSLog, Net. For instance:Dlogsupports plain (by default), emoji and colored styles for text messages and you can set a needed one:Outputs:
Where
=>is pipeline operator and it can be used for creating a list of outputs:All log messages will be written to
stdoutfirst and the the error messages only to the file.Log levels
logLog a message:
Outputs:
infoLog an information message and helpful data:
Outputs:
traceLog the current function name and a message (if it is provided) to help in debugging problems during the development:
Outputs:
debugLog a debug message to help debug problems during the development:
Outputs:
warningLog a warning message that occurred during the execution of your code.
Outputs:
errorLog an error that occurred during the execution of your code.
Outputs:
assertSanity check and log a message (if it is provided) when a condition is false.
Outputs:
faultLog a critical bug that occurred during the execution in your code.
Outputs:
Privacy
Privacy options allow to manage the visibility of values in log messages.
publicIt applies to all values in log messages by default and the values will be visible in logs.
Outputs:
privateBecause users can have access to log messages that your app generates, use the
privateprivacy options to hide potentially sensitive information. For example, you might use it to hide or mask an account information or personal data.The standard
privateoption redacts a value with the generic string.Outputs:
private(mask: .hash)The mask option to redact a value with its hash value in the logs.
Outputs:
private(mask: .random)The mask option to redact a value with a random values for each symbol in the logs.
Outputs:
private(mask: .redact)The mask option to redact a value with a generic values for each symbol in the logs.
Outputs:
private(mask: .shuffle)The mask option to redact a value with a shuffled value from all symbols in the logs.
Outputs:
private(mask: .custom(value:))The mask option to redact a value with a custom string value in the logs.
Outputs:
private(mask: .reduce(length:))The mask option to redact a value with its reduced value of a provided length in the logs.
Outputs:
private(mask: .partial(first:, last:))The mask option to redact a value with its parts from start and end of provided lengths in the logs.
Outputs:
Formatters
DLog formats values in log messages based on the default settings, but you can apply custom formatting to your variables to make them more readable.
Date
The formatting options for date values.
date(dateStyle: DateFormatter.Style, timeStyle: DateFormatter.Style, locale: Locale?)The formatting options for Date values.
Outputs:
dateCustom(format: String)Format date with a custom format string.
Outputs:
Integer
The formatting options for integer (Int8, Int16, Int32, Int64, UInt8 etc.) values.
binaryDisplays an integer value in binary format.
Outputs:
octal(includePrefix: Bool)Displays an integer value in octal format with the specified parameters.
Outputs:
hex(includePrefix: Bool, uppercase: Bool)Displays an integer value in hexadecimal format with the specified parameters.
Outputs:
byteCount(countStyle: ByteCountFormatter.CountStyle, allowedUnits: ByteCountFormatter.Units)Format byte count with style and unit.
Outputs:
number(style: NumberFormatter.Style, locale: Locale?)Displays an integer value in number format with the specified parameters.
Outputs:
httpStatusCodeDisplays a localized string corresponding to a specified HTTP status code.
Outputs:
ipv4AddressDisplays an integer value (Int32) as IPv4 address.
Outputs:
time(unitsStyle: DateComponentsFormatter.UnitsStyle)
Displays a time duration from seconds.
Outputs:
date(dateStyle: DateFormatter.Style, timeStyle: DateFormatter.Style, locale: Locale?)
Displays date from seconds since 1970.
Outputs:
Float
The formatting options for double and floating-point numbers.
fixed(precision: Int)Displays a floating-point value in fprintf’s
%fformat with specified precision.Outputs:
hex(includePrefix: Bool, uppercase: Bool)Displays a floating-point value in hexadecimal format with the specified parameters.
Outputs:
exponential(precision: Int)Displays a floating-point value in fprintf’s
%eformat with specified precision.Outputs:
hybrid(precision: Int)Displays a floating-point value in fprintf’s
%gformat with the specified precision.Outputs:
number(style: NumberFormatter.Style, locale: Locale?)Displays a floating-point value in number format with the specified parameters.
Outputs:
time(unitsStyle: DateComponentsFormatter.UnitsStyle)
Displays a time duration from seconds.
Outputs:
date(dateStyle: DateFormatter.Style, timeStyle: DateFormatter.Style, locale: Locale?)
Displays date from seconds since 1970.
Outputs:
Bool
The formatting options for Boolean values.
binaryDisplays a boolean value as 1 or 0.
Outputs:
answerDisplays a boolean value as yes or no.
Outputs:
toggleDisplays a boolean value as on or off.
Outputs:
Data
The formatting options for Data.
ipv6Address
Pretty prints an IPv6 address from data.
Outputs:
text
Pretty prints text from data.
Outputs:
uuid
Pretty prints uuid from data.
Outputs:
raw
Pretty prints raw bytes from data.
Outputs:
Scope
scopeprovides a mechanism for grouping work that’s done in your program, so that can see all log messages related to a defined scope of your code in a tree view:Outputs:
Where:
[Loading]- Name of the scope.(0.330s)- Time duration of the scope in secs.You can get duration value of a finished scope programatically:
It’s possible to
enterandleavea scope asynchronously:Outputs:
Scopes can be nested one into one and that implements a global stack of scopes:
Outputs:
Interval
intervalmeasures performance of your code by a running time and logs a detailed message with accumulated statistics in seconds:Outputs:
Where:
average- Average time duration of all intervals.duration- The current time duration of the current interval.sorting- Name of the interval.You can also get the current interval’s duration and all its statistics programatically:
To measure asynchronous tasks you can use
beginandendmethods:Outputs:
Category
You can define category name to differentiate unique areas and parts of your app and DLog uses this value to categorize and filter related log messages. For example, you might define separate strings for your app’s user interface, data model, and networking code.
Outputs:
Configuration
You can apply your specific configuration to your category to change the default log messages appearance, visible info and details etc. (See more: Configuration )
For instance:
Outputs:
Metadata
In its most basic usage, metadata is useful for grouping log messages about the same subject together. For example, you can set the request ID of an HTTP request as metadata, and all the log lines about that HTTP request would show that request ID.
Logger metadata is a keyword list stored in the dictionary and it can be applied to the logger on creation or changed with its instance later, e.g.:
Outputs:
Where:
(id:12345,process:main)- key-value pairs of the current metadata.The same works with category and scope which copy its parent metadata on creation, but this copy can be changed later:
Outputs:
Outputs
Text
Textis a source output that generates text representation of log messages. It doesn’t deliver text to any target outputs (stdout, file etc.) and usually other outputs use it.It supports thee styles:
.plain- universal plain text.emoji- text with type icons for info, debug etc. (useful for XCode console).colored- colored text with ANSI escape codes (useful for Terminal and files)Outputs:
Colored text in Terminal:
You can also use shortcuts
.textPlain,.textEmojiand.textColoredto create the output:Standard
Standardis a target output that can output text messages to POSIX streams:stdout- Standard Outputstderr- Standard ErrorYou can also use shortcuts
.stdoutand.stderrto create the output for the logger:By default
StandardusesText(style: .plain)output as a source to write text to the streams but you can set other:Outputs:
File
Fileis a target output that writes text messages to a file by a provided path:By default
Fileoutput clears content of a opened file but if you want to append data to the existed file you should setappendparameter totrue:You can also use
.fileshortcut to create the output:Fileoutput usesText(style: .plain)as a source by default but you can change it:File “dlog.txt”:
OSLog
OSLogis a target output that writes messages to the Unified Logging System (https://developer.apple.com/documentation/os/logging) that captures telemetry from your app for debugging and performance analysis and then you can use various tools to retrieve log information such as:ConsoleandInstrumentsapps, command line toollogetc.To create
OSLogyou can use subsystem strings that identify major functional areas of your app, and you specify them in reverse DNS notation—for example,com.your_company.your_subsystem_name.OSLogusescom.dlog.loggersubsystem by default:You can also use
.oslogshortcut to create the output:All DLog’s methods map to the system logger ones with appropriate log levels e.g.:
Console.app with log levels:
DLog’s scopes map to the system logger activities:
Console.app with activities:
DLog’s intervals map to the system logger signposts:
Instruments.app with signposts:
Net
Netis a target output that sends log messages toNetConsoleservice that can be run from a command line on your machine. The service is provided as executable inside DLog package and to start it you should runsh NetConsole.command(or just click onNetConsole.commandfile) inside the package’s folder and then the service starts listening for incoming messages:Then the output connects and sends your log messages to
NetConsole:Terminal:
By default
NetusesText(style: .colored)output as a source but you can set other:And you can also use
.netshortcut to create the output for the logger.To connect to a specific instance of the service in your network you should provide an unique name to both
NetConsoleandNetoutput (“DLog” name is used by default).To run the
NetConsolewith a specific name run next command:In swift code you should set the same name:
More params of
NetConsoleyou can look at help:Pipeline
As described above
File,NetandStandardoutputs havesourceparameter in their initializers to set a source output that is very useful if we want to change an output by default:Actually any output has
sourceproperty:So that it’s possible to make a linked list of outputs:
Where
textis a source forstdandstdis a source forfile: text –> std –> file, and now each text message will be sent to bothstdandfileoutputs consecutive.Lets rewrite this shorter:
Where
=>is pipeline operator which defines a combined output from two outputs where the first one is a source and second is a target. So from example above emoji text messages will be written twice: first to standard output and then to the file.You can combine any needed outputs together and create a final chained output from multiple outputs and your messages will be forwarded to all of them one by one:
Filter
Filteror.filterrepresents a pipe output that can filter log messages by next available fields:time,category,type,fileName,funcName,line,textandscope. You can inject it to your pipeline where you need to log specific data only.Examples:
Outputs:
Outputs:
Outputs:
Outputs:
.disabledIt is the shared disabled logger constant that doesn’t emit any log message and it’s very useful when you want to turn off the logger for some build configuration, preference, condition etc.
The same can be done for disabling unnecessary log categories without commenting or deleting the logger’s functions:
The disabled logger continue running your code inside scopes and intervals:
Outputs:
Configuration
You can customize the logger’s output by setting which info from the logger should be used.
LogConfigis a root struct to configure the logger which contains common settings for log messages.For instance you can change the default view of log messages which includes a start sign, category, log type and location:
Outputs:
To new appearance that includes your start sign and timestamp only:
Outputs:
TraceConfigIt contains configuration values regarding to the
tracemethod which includes trace view options, thread and stack configurations.By default
tracemethod uses.compactview option to produce information about the current function name and thread info:Outputs:
But you can change it to show a function and queue names with pretty style:
Outputs:
ThreadConfigThe trace configuration has
threadConfigproperty to change view options of thread info. For instance the logger can print the current QoS of threads.Outputs:
StackConfigThe
tracemethod can output the call stack backtrace of the current thread at the moment this method was called. To enable this feature you should configure stack view options, style and depth withstackConfigproperty:Outputs:
IntervalConfigYou can change the view options of interval statistics with
intervalConfigproperty ofLogConfigto show needed information such as:.count,.min,.maxetc. Or you can use.allto output all parameters.Outputs:
Objective-C
DLog exposes all functionality to Objective-C via
DLogObjClibrary and it’s very useful in projects with mixed code so you can log messages, create scopes and intervals, share global loggers etc.Log levels
Also you can format log messages:
Output:
Scope
Interval
Category
Pipeline
Outputs:
Filter
Outputs:
Disabled
Installation
XCode project
Xcode > File > Add Packages...https://github.com/ikhvorost/DLog.gitimport DLogSwift Package
Add
DLogpackage dependency to yourPackage.swiftfile:License
DLog is available under the MIT license. See the LICENSE file for more info.