TraceLog is a highly configurable, flexible, portable, and simple to use debug logging system for Swift and Objective-C applications running on Linux, macOS, iOS, watchOS, and tvOS.

Overview

Please star this github repository to stay up to date.

TraceLog license: Apache 2.0

Platforms: iOS | macOS | watchOS | tvOS | Linux Swift 5.0 Version Build Status   Codecov

Introduction

TraceLog is a highly configurable, flexible, portable, and simple to use debug logging system for Swift and Objective-C applications running on Linux, macOS, iOS, watchOS, and tvOS.

TraceLog Design Philosophy

  1. Universal: With TraceLog you are not locked into one type of logging system, as a matter of fact, you can choose to use a combination of log writers to write to various endpoints and systems.
  2. Flexible: With TraceLog you can filter messages dynamically at run time or statically at compile time. Choose whatever combination of Writers and filters that work for your particular use case. Write your own custom Writers to plug into TraceLog for customized use-cases.
  3. Portable: At this writing, TraceLog is one of the few logging systems that was designed to run on all swift supported platforms (Linux, macOs, iOS, tvOS, and watchOS) and be used in multiple languages (Swift and Objective-C).
  4. Lightweight: TraceLog's footprint is small and efficient. It's designed and meant to be as efficient on resources as can be and also optimize itself out if required by the use case.
  5. Easy to use: TraceLog can be used right out of the box with No setup or special dependencies. That was designed in, and we've worked hard to maintain that over the years. You can literally link to it and start adding log statements to your app and get useful output on any platform.

Features

  • Quick and easy to get started.
  • Fully configurable.
  • Message filtering.
  • Logging Levels (error, warning, info, trace1, trace2, trace3, trace4).
  • Custom tag support for message grouping and filtering.
  • Dynamically configurable levels via the OS environment at run time or inline code compiled into the application.
  • Installable log writers (multiple writers at a time)
  • Create custom log writers for any use-case.
  • Predefined log writers to write to various endpoints.
    • Built-in (OutputStreamWriters)
      • Stdout (ConsoleWriter) - A simple standard out (stdout) writer for logging to the console or terminal.
      • File (FileWriter) - A file writer which writes log output to files on local disk managing rotation and archive of files as needed.
    • External
  • Output formatters for formatting the log entries in any format required.
    • TextFormat a customizable human readable text formatter useable with any OutputStreamWriter.
    • JSONFormat a customizable JSON string formatter usable with any OutputStreamWriter.
  • Create custom output formatters for any use case.
  • An output buffering mode to buffer output when a writer is unavailable (e.g. on iOS when protected data is not available).
  • Multiple concurrency modes for writing to Writers. Settable globally or per Writer installed.
    • direct - straight through real-time logging.
    • sync - blocking queued logging.
    • async - background thread logging.
  • Multi-language: Swift and Objective-C support.
  • Portable: Linux, macOS, iOS, tvOS, WatchOS

Documentation

  • User Guides & Reference - Extensive user guides and reference documentation! 100% documented API, full examples and many hidden details.

Quick Start Guide

Using TraceLog is incredibly simple out of the box. Although TraceLog is highly configurable, to get started all you have to do is add the pod to your project, import TraceLog to the files that require logging and start adding log statements where you need them. TraceLog initializes itself and does everything else for you.

Add TraceLog to your project

In your Podfile add TraceLog.

    target 'MyApp'

    pod "TraceLog", '~>5.0'

If you have mixed Swift and Objective-C code, you must specify the subspec to enable Objective-C as follows:

    target 'MyApp'

    pod "TraceLog", '~>5.0'
    pod "TraceLog/ObjC", '~>5.0'

Import TraceLog and Start logging

Import TraceLog into you files and start logging.

    import TraceLog

    struct MyStruct {

        func doSomething() {

            logInfo { "A simple TraceLog Test message" }
        }
    }

Log Functions

TraceLog has the following primary logging functions to log various levels of information. The output of these can be controlled via the environment variables at runtime or programmatically at application startup via the TraceLog.configure() func.

    logError  (tag: String?, message: @escaping () -> String)
    logWarning(tag: String?, message: @escaping () -> String)
    logInfo   (tag: String?, message: @escaping () -> String)
    logTrace  (tag: String?, level: UInt, message: @escaping () -> String)
    logTrace  (level: UInt, @escaping message: () -> String)

Note: hidden parameters and defaults were omitted for simplicity.

Basic Configuration

Although not strictly require, calling the TraceLog.configure() command at startup will allow TraceLog to read the environment for configuration information.

Simply call configure with no parameters as early as possible in your startup code (preferably before ay log statements get called.)

    TraceLog.configure()

For a complete documentation set including user guides, a 100% documented API reference and many more examples, please see https://tonystone.io/tracelog.

Runtime Overhead

The Swift implementation was designed to take advantage of swift compiler optimizations and will incur no overhead when compiled with optimization on (-O) and TRACELOG_DISABLED is defined.

The Objective-C implementation was designed to take advantage of the preprocessor and when compiled with TRACELOG_DISABLED defined, will incur no overhead in the application.

For XCode TRACELOG_DISABLED can be set in the project target. For Swift Package Manager pass a swiftc directive to swift build as in the following example.

swift build -Xswiftc -DTRACELOG_DISABLED

Minimum Requirements

Build Environment

Platform Version Swift Swift Build Xcode
Linux Ubuntu 14.04, 16.04, 16.10 5.0
OSX 10.13 5.0 Xcode 10.x

Minimum Runtime Version

iOS OS X tvOS watchOS Linux
9.0 10.13 9.0 2.0 Ubuntu 14.04, 16.04, 16.10

Note:

To build and run on Linux we have a a pre-configured Vagrant file located at https://github.com/tonystone/vagrant-swift

See the README for instructions.

Installation (Swift Package Manager)

TraceLog now supports dependency management via Swift Package Manager on All Apple OS variants as well as Linux.

Please see Swift Package Manager for further information.

Installation (CocoaPods)

TraceLog is available through CocoaPods. See the Quick Start Guide for installing through CocoaPods.

See the "Using CocoaPods" guide for more information on CocoaPods itself.

Author

Tony Stone (https://github.com/tonystone)

License

TraceLog is released under the Apache License, Version 2.0

Comments
  • Question about system logs

    Question about system logs

    Hi Tony and others (if there are) ^^

    I'm helping at the langserver-swift project and we'd like to have some cross-platform logging. And since I know for a fact that TraceLog does work on both Darwin and Linux, I'm thinking it might be the perfect tool for the job.

    Yesterday when we were talking about this, Ryan said that we should be outputting the log messages to Unified logging on Darwin and to the systemd logging journal on Linux. I think that's reasonable. Is is possible to configure TraceLog to do that? I know close to nothing about system logs so please forgive me if I'm noobing too much here. I know I probably am :sweat_smile:

    enhancement question 
    opened by felix91gr 88
  • On the topic of including (or not, and how) the OSLoggers for a common API

    On the topic of including (or not, and how) the OSLoggers for a common API

    Okay. So I've asked in the forums about how to tackle the issue that @tonystone presented at #44 here:

    I chose to keep it separate for one primary reason which is that I don't want to force all Linux users to have to install systemd-dev just to use TraceLog. There are many applications that do not have a need for that Writer and just want to link to TraceLog and go.

    I think that you're right, Tony. But I feel like it's better to have it be included by default. If you agree, the method provided in the forums opens up a (mostly) clear way.

    But here's my justification for wanting it be included by default: in a server environment, where you'd be more restrictive on what packages you install, you'd (almost certainly) want to put your log entries in the system journal so that's alright.

    That leaves us with the desktop users, both in Mac and Linux, and the users in mobile Darwin (iOS, WatchOS) platforms.

    Let's first tackle where the Darwin (both desktop and mobile) users lie right now. As it stands, the 4.0.0 release gives them os_log logging. If an app or library developer chooses to use it, no problem! And if they don't... good as well! The current TraceLog code wouldn't change at all.

    That leaves us with the Linux desktop users. If you were in Windows, you'd be reticent to install anything and with good reason. But in Linux, specially if you're using apt-get (Debian) or another trusted, signed repository, you know it doesn't contain malicious software, and can verify the integrity of the binaries. The two main concerns would then be (a) Breaking another package or (b) Binary size. In the case of Python packages, (a) is completely justified because setting it up correctly requires a bit of black magic. In this case, with libsystemd-dev being a OS-provided library, that should never happen.

    (b) Is the last concern. I went and looked up how much systemd-dev weighs, and it's less than 1 MB!, which is actually less than I expected :sweat_smile:.

    So all in all, I think it makes sense for it to be included by default.


    Now from an API standpoint, I think we should either:

    • Include OS logging in both (Darwin, Linux) platforms by default.
    • Not include OS logging in both platforms, by default, and include it with a compile-time option (e.g by reading an environment variable at the Package manifest).

    This would make the API uniform in all platforms, which brings a lot of benefits. Take for example a library author who wants to use TraceLog in the current configuration for OS logging, who might be testing it only on MacOS first. Then when they try to port it to Linux, they find themselves having to use a bunch of #if os(...), #elseif statements because the TraceLog API they were using is not available under Linux.

    If instead the API was uniform, when they started porting it to Linux they would install systemd-dev and after that everything would behave in exactly the same way as it does on MacOS. And that, I think, would be a great relief :relieved:


    I will write up on ideas of how to implement this afterwards because my hands are very tired at the moment :sweat_smile:

    Please, lemme know what you think :slightly_smiling_face:

    opened by felix91gr 9
  • [API question] Printing logs to `stdout`

    [API question] Printing logs to `stdout`

    Hi again :)

    Not wanting to clutter up #44 unnecessarily, I've opened this issue.

    I'm learning the basics of TraceLog by writing a Swift script. So far, it compiles, but I can't seem to be able to print the logs to stdout and I don't really know why. Here's what I have so far. I must be missing a config step or something?

    Thanks :)

    opened by felix91gr 8
  • Docs index

    Docs index

    Description

    • Replace main jazzy doc page readme with a doc index page specific to jazzy docs.
    • Update description of TraceLog to match the jazzy docs.

    Motivation and Context

    Remove redundant information from the main docs page.

    How Has This Been Tested?

    Pages reviewed manually before check-in.

    Checklist:

    For all changes:

    • [ ] Is there an issue associated with this PR? Is it referenced in the commit message?
    • [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    • [x] Is your initial contribution a single, squashed commit?

    For code changes:

    • [x] Avoid other runtime dependencies
    • [x] Have you written or updated unit tests to verify your changes?
    • [x] Have you ensured that the full suite of tests is executed via make tests in the cmake-build-debug` directory off the root of the project?
    • [x] If applicable, have you updated the documentation?
    • [x] If applicable, have you updated the CHANGELOG.md file?

    For documentation related changes:

    • [x] Have you ensured that format looks appropriate for the output in which it is rendered?

    Note:

    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

    opened by tonystone 2
  • Initial implementation of a safe (no fatalErrors thrown) OutputStream.

    Initial implementation of a safe (no fatalErrors thrown) OutputStream.

    The current implementation (as of this writing) of FileHandle in swift will call fatalError() for any thrown error during the write operation.

        public func write(_ data: Data) {
            data.enumerateBytes() { (bytes, range, stop) in
                do {
                    try NSData.writeToFileDescriptor(self._fd, path: nil, buf: UnsafePointer<Void>(bytes.baseAddress!), length: bytes.count)
                } catch {
                    fatalError("Write failure")
                }
            }
        }
    

    TraceLog must be reliable and not have cases that will crash the app so we were compelled to write our own FileOutputStream class to replace the FileHandle foundation class. This also gives us the advantage of improved performance during writes.

    See: https://bugs.swift.org/browse/SR-2138 for more information.

    opened by tonystone 2
  • TextFormat

    TextFormat

    Added

    • Added ByteOutputFormatter protocol to define formatters for use with byte output stream type Writers.
    • Added TextFormat, an implementation of a TextOutputFormatter that formats its output based on a supplied template (this is the default formatter for Console and File output). - Added TextFormat, an implementation of a ByteOutputFormatter that formats its output based on a supplied template (this is the default formatter for Console and File output).
    • Added ByteOutputWriter protocol to define types that write byte streams to their output and accept ByteOutputFormatter types to format the output.

    Changed

    • Changed ConsoleWriter to accept new ByteOutputFormatter instances allowing you to customize the output log format (default is TextFormat.)
    • Changed FileWriter to accept new ByteOutputFormatter instances allowing you to customize the output log format (default is TextFormat.)
    • Changed FileWriter archive file name date format to "yyyyMMdd-HHmm-ss-SSS".
      • This was done for maximum compatibility between platforms and can be overridden in the FileConfiguration object passed at init.
    opened by tonystone 2
  • Fixing Swift compile warnings

    Fixing Swift compile warnings

    Fixing warnings from Swift 2.2 / Xcode 7.3:

    • Removing ++ operator.
    • Replacing old style debug identifiers (e.g. FILE) with new style (e.g. #file).

    This will require projects with a dependency on TraceLog to use Xcode 7.3 (or greater) to support Swift 2.2 syntax. The pod will still remain backwards compatible to iOS 8.0.

    opened by phchang 2
  • Fix 'Initialization of 'UnsafePointer<UInt8>' results in a dangling pointer' warning

    Fix 'Initialization of 'UnsafePointer' results in a dangling pointer' warning

    Description

    Fix new xcode warning 'Initialization of 'UnsafePointer' results in a dangling pointer'

    Motivation and Context

    How Has This Been Tested?

    All existing tests have been run and have passed.

    Checklist:

    For all changes:

    • [ ] Is there an issue associated with this PR? Is it referenced in the commit message?
    • [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    • [ ] Is your initial contribution a single, squashed commit?

    For code changes:

    • [x] Avoid other runtime dependencies
    • [x] Have you written or updated unit tests to verify your changes?
    • [x] Have you ensured that the full suite of tests is executed via make tests in the cmake-build-debug` directory off the root of the project?
    • [x] If applicable, have you updated the documentation?
    • [x] If applicable, have you updated the CHANGELOG.md file?

    For documentation related changes:

    • [ ] Have you ensured that format looks appropriate for the output in which it is rendered?

    Note:

    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

    opened by tonystone 1
  • Release 5.0.0

    Release 5.0.0

    Description

    Prep for release 5.0.0

    How Has This Been Tested?

    All existing tests were run and passed.

    Checklist:

    For all changes:

    • [ ] Is there an issue associated with this PR? Is it referenced in the commit message?
    • [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    • [ ] Is your initial contribution a single, squashed commit?

    For code changes:

    • [x] Avoid other runtime dependencies
    • [x] Have you written or updated unit tests to verify your changes?
    • [x] Have you ensured that the full suite of tests is executed via make tests in the cmake-build-debug` directory off the root of the project?
    • [x] If applicable, have you updated the documentation?
    • [x] If applicable, have you updated the CHANGELOG.md file?

    For documentation related changes:

    • [x] Have you ensured that format looks appropriate for the output in which it is rendered?

    Note:

    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

    opened by tonystone 1
  • Add protected data monitoring for fixed FileWriter strategy on iOS

    Add protected data monitoring for fixed FileWriter strategy on iOS

    Description

    Additions to monitor protected data on iOS and allow buffering it not available. This allows TraceLog to be started up before Protected data is available giving you debug visibility into the app while in the locked state. Implements issue #100 for the fixed strategy.

    Motivation and Context

    Need the ability to log on iOS before protected data becomes available.

    Checklist:

    For all changes:

    • [x] Is there an issue associated with this PR? Is it referenced in the commit message?
    • [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    • [ ] Is your initial contribution a single, squashed commit?

    For code changes:

    • [x] Avoid other runtime dependencies
    • [ ] Have you written or updated unit tests to verify your changes?
    • [x] Have you ensured that the full suite of tests is executed via make tests in the cmake-build-debug` directory off the root of the project?
    • [x] If applicable, have you updated the documentation?
    • [x] If applicable, have you updated the CHANGELOG.md file?

    For documentation related changes:

    • [ ] Have you ensured that format looks appropriate for the output in which it is rendered?

    Note:

    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

    opened by tonystone 1
  • Fixed broken link in README.

    Fixed broken link in README.

    Fixed the broken Quick Start Guide link under the Installation (CocoaPods) section.

    Description

    Changed the link from Quick&#32;Start&#32;Guide to quick-start-guide.

    Motivation and Context

    Fixes broken docs, massively reducing confusion! ;)

    How Has This Been Tested?

    Forked and confirmed that the link works.

    Checklist:

    For all changes:

    • [ ] Is there an issue associated with this PR? Is it referenced in the commit message?
    • [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    • [x] Is your initial contribution a single, squashed commit?

    For code changes:

    • [ ] Avoid other runtime dependencies
    • [ ] Have you written or updated unit tests to verify your changes?
    • [ ] Have you ensured that the full suite of tests is executed via make tests in the cmake-build-debug` directory off the root of the project?
    • [ ] If applicable, have you updated the documentation?
    • [ ] If applicable, have you updated the CHANGELOG.md file?

    For documentation related changes:

    • [x] Have you ensured that format looks appropriate for the output in which it is rendered?

    Note:

    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

    opened by appsandwich 1
  • Enhance `FileWriter` on iOS to only write when protected data is available.

    Enhance `FileWriter` on iOS to only write when protected data is available.

    Describe the solution you'd like Add checks specifically for iOS that monitor the protected state of the log file currently being written to and only write when it is available. this would use the new FailureReason to return .unavailable when the protected data is not available.

    Describe alternatives you've considered None.

    enhancement 
    opened by tonystone 1
  • Add archive and/or delete to `FileWriter` rotate strategy.

    Add archive and/or delete to `FileWriter` rotate strategy.

    Describe the solution you'd like In order to control and limit space taken on disk for files written with the FileWriter, we should have a way to control the number and disposition of files created. these can take the form of an Archive (compress) and/or delete after a certain number of a file or a certain size of space taken is reached.

    Describe alternatives you've considered None considered accept for doing nothing which is not an option for files that grow to large sizes due to verbose logging or simply time written to a single log file.

    enhancement 
    opened by tonystone 0
Releases(5.0.1)
  • 5.0.1(Apr 9, 2021)

    Fixed

    • Fix 'Initialization of 'UnsafePointer' results in a dangling pointer' compiler warning.
    • Fixed crash in AsyncWriterProxy buffering when buffer is empty.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0(Dec 10, 2019)

    Added

    • Added OutputStreamFormatter protocol to define formatters for use with byte output stream type Writers.
    • Added TextFormat, an implementation of a OutputStreamFormatter that formats its output based on a supplied template (this is the default formatter for Console and File output).
    • Added JSONFormat, an implementation of a OutputStreamFormatter that formats its output in standard JSON format.
    • Added OutputStreamWriter protocol to define types that write byte streams to their output and accept OutputStreamFormatter types to format the output.
    • Added LogEntry tuple type to Writer defining the formal types that a Writer writes.
    • Added .buffer option for .async concurrency modes to allow for buffering when the writer is not available to write to its endpoint.
    • Added protected data monitoring for FileWriter.Strategy.fixed on iOS for use with AsyncConcurrencyModeOption.buffer(writeInterval:strategy:). This allows TraceLog to be started up before protected data is available on iOS.

    Upated

    • Requires Swift 5 for compilation.
    • Changed parameters to .async to include options for configuration of the mode (.async(options: Set<AsyncConcurrencyModeOption>) and .async(Writer, options: Set<AsyncConcurrencyModeOption>)).
    • Changed Writer protocol log() method to write(_ entry: Writer.LogEntry) to make it easier to process messages by writers and formatters.
    • Changed Writer return to Swift.Result<Int, FailedReason> to return instructions for TraceLog for buffering and error recovery.
    • Changed ConsoleWriter to accept new OutputStreamFormatter instances allowing you to customize the output log format (default is TextFormat.)
    • Changed FileWriter public interface
      • FileWriter now requires the log directory be passed in, removing default value of ./.
      • Removed the fileConfiguration parameter replacing with new strategy enum.
      • It now accepts the new OutputStreamFormatter instances allowing you to customize the output log format (default is TextFormat.)
    • Changed FileWriter archive file name date format to "yyyyMMdd-HHmm-ss-SSS" (This was done for maximum compatibility between platforms and can be overridden in the FileConfiguration object passed at init.)
    • TextFormat to add var encoding: String.Encoding { get } requirement.
    • JSONFormat to add var encoding: String.Encoding { get } requirement.
    • Renamed AsyncOption to AsyncConcurrencyModeOption.
    • Changed OutputStreamFormatter, it now requires var encoding: String.Encoding { get }.
    • Renamed FileWriter.FileStrategy to FileWriter.Strategy.
    • Renamed FileWriter.Strategy.RotateOption to FileWriter.Strategy.RotationOption.

    Removed

    • Removed TraceLogTestHarness module.

    Fixed

    • Fixed logTrace when no trace level is passed. It's now the correct default value of 1 instead of 4 (issue #58).
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0-beta.4(Sep 16, 2019)

  • 5.0.0-beta.3(Sep 15, 2019)

    Added

    • Added protected data monitoring for FileWriter.Strategy.fixed on iOS for use with AsyncConcurrencyModeOption.buffer(writeInterval:strategy:). This allows TraceLog to be started up before protected data is available on iOS.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0-beta.2(Mar 4, 2019)

    Added

    • Added extensive HTML documentation including user guides and a complete API reference.

    Changed

    • Renamed AsyncOption to AsyncConcurrencyModeOption.
    • Changed OutputStreamFormatter, it now requires var encoding: String.Encoding { get }.
    • Renamed FileWriter.FileStrategy to FileWriter.Strategy.
    • Renamed FileWriter.Strategy.RotateOption to FileWriter.Strategy.RotationOption.

    Updated

    • TextFormat to add var encoding: String.Encoding { get } requirement.
    • JSONFormat to add var encoding: String.Encoding { get } requirement.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0-beta.1(Feb 25, 2019)

    Added

    • Added OutputStreamFormatter protocol to define formatters for use with byte output stream type Writers.
    • Added TextFormat, an implementation of a OutputStreamFormatter that formats its output based on a supplied template (this is the default formatter for Console and File output).
    • Added JSONFormat, an implementation of a OutputStreamFormatter that formats its output in standard JSON format.
    • Added OutputStreamWriter protocol to define types that write byte streams to their output and accept OutputStreamFormatter types to format the output.
    • Added LogEntry tuple type to Writer defining the formal types that a Writer writes.
    • Added .buffer option for .async concurrency modes to allow for buffering when the writer is not available to write to its endpoint.

    Changed

    • Requires Swift 5 for compilation.
    • Changed parameters to .async to include options for configuration of the mode (.async(options: Set<AsyncOption>) and .async(Writer, options: Set<AsyncOption>)).
    • Changed Writer protocol log() method to write(_ entry: Writer.LogEntry) to make it easier to process messages by writers and formatters.
    • Changed Writer return to Swift.Result<Int, FailedReason> to return instructions for TraceLog for buffering and error recovery.
    • Changed ConsoleWriter to accept new OutputStreamFormatter instances allowing you to customize the output log format (default is TextFormat.)
    • Changed FileWriter public interface
      • FileWriter now requires the log directory be passed in, removing default value of ./.
      • Removed the fileConfiguration parameter replacing with new strategy enum.
      • It now accepts the new OutputStreamFormatter instances allowing you to customize the output log format (default is TextFormat.)
    • Changed FileWriter archive file name date format to "yyyyMMdd-HHmm-ss-SSS" (This was done for maximum compatibility between platforms and can be overridden in the FileConfiguration object passed at init.)

    Removed

    • Removed TraceLogTestHarness module.

    Fixed

    • Fixed logTrace when no trace level is passed. It's now the correct default value of 1 instead of 4 (issue #58).
    Source code(tar.gz)
    Source code(zip)
  • 4.0.1(Sep 10, 2018)

  • 4.0.0(Sep 6, 2018)

    Added

    • Added mode to TraceLog.configuration to allow direct, async, or sync mode of operation. Sync & direct mode are useful for use cases that have short-lived processes (scripts) or require real-time logging.
    • Added ability to set the concurrency mode individually for each Writer.
    • Added FileWriter class for writing to local log files.
    • Added TestHarness to assist developers in testing their own Writer types.
    • Added shell utility to assist in testing Writer types.
    • Added TraceLogTestTools module/library to allow use of new TestHarness and other Utilities.

    Removed

    • Removed all Xcode projects, Xcode projects are now generated using Swift Package Manager.
    • Dropped iOS 8 support.
    Source code(tar.gz)
    Source code(zip)
  • 4.0.0-beta.3(Jul 6, 2018)

  • 4.0.0-beta.2(Jun 26, 2018)

    Added

    • Added TestHarness to assist developers in testing their own Writer types.
    • Added shell utility to assist in testing Writer types.
    • Added TraceLogTestTools module/library to allow use of new TestHarness and other Utilities.

    Removed

    • Removed the UnifiedLoggingWriter and instead using external AdaptiveSystemLogWriter which adapts to various platforms for latest system log.
    Source code(tar.gz)
    Source code(zip)
  • 4.0.0-beta.1(Jun 13, 2018)

    Added

    • Added UnifiedLoggingWriter for Apple Unified Logging system logging using TraceLog.
    • Added mode to TraceLog.configuration to allow direct, async, or sync mode of operation. Sync & direct mode are useful for use cases that have short-lived processes (scripts) or require real-time logging.
    • Added ability to set the concurrency mode individually for each Writer.

    Removed

    • Removed all Xcode projects, Xcode projects are now generated using Swift Package Manager.
    • Dropped iOS 8 support.
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0(May 10, 2018)

    Updated

    • Xcode projects to be swift 4.1 compatible.

    Removed

    • Removed deprecated TLLogger.configure(). Use TraceLog.configure in swift instead.
    • Removed deprecated TLLogger.configureWithEnvironment. Use TraceLog.configure in swift instead.
    Source code(tar.gz)
    Source code(zip)
  • 2.2.0(Feb 25, 2018)

  • 2.1.0(Oct 2, 2017)

  • 2.0.2(May 18, 2017)

    Added

    • Added required tests to bring coverage back to 100%.

    Updated

    • Deprecated TLLogger.configure and TLLogger.configureWithEnvironment. Use TraceLog.configure in swift instead.
    • Changed Vagrant file to include libpython2.7 required for Swift REPL.

    Fixed

    • Removed unnecessary String with formatters call that can result in a crash if the interpolated string includes formatter options that the String(format:) function will never have matching parameters for.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.1(Oct 17, 2016)

    Added

    • The OS_ACTIVITY_MODE environment variable to iOS and OSX Example.
    • CHANGELOG.md

    Updated

    • Inline documentation for all public classes and functions.
    • Combined TraceLog.configure func's into one with the same symantics as the 3 previous funcs.
    • iOS example application converting it to Swift.

    Fixed

    • Cocoadocs documentation creation.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Oct 15, 2016)

    This release includes the addition of:

    • Installable Writers to allow custom writers to be used to write to various output devices/end points such as HTTP services, sys log, files, etc
    • Ability to configure the environment statically at the beginning of the application
    • Swift 3 Compatibility
    • Swift Package Manager support
    • Linux support
    • Now written in Swift 3
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Apr 7, 2016)

  • 0.4.5(Dec 1, 2015)

    • Fixed issue with Swift only (pod 'TraceLog/Swift') applications not seeing output.
    • Removed requirement for adding -DDEBUG to OTHER_SWIFT_FLAGS.
    Source code(tar.gz)
    Source code(zip)
  • 0.4.3(Nov 17, 2015)

Owner
Tony Stone
Builder, programmer, architect.
Tony Stone
Easy to use and lightweight logger for iOS, macOS, tvOS, watchOS and Linux in Swift.

Lighty Easy to use and lightweight logger for iOS, macOS, tvOS, watchOS and Linux in Swift. Screenshots Requirements Lighty Version Minimum iOS Target

Abdullah Selek 51 Dec 21, 2022
JustLog brings logging on iOS to the next level. It supports console, file and remote Logstash logging via TCP socket with no effort. Support for logz.io available.

JustLog JustLog takes logging on iOS to the next level. It supports console, file and remote Logstash logging via TCP socket with no effort. Support f

Just Eat 509 Dec 10, 2022
Twitter Logging Service is a robust and performant logging framework for iOS clients

Twitter Logging Service Background Twitter created a framework for logging in order to fulfill the following requirements: fast (no blocking the main

Twitter 290 Nov 15, 2022
A logging backend for swift-log that sends logging messages to Logstash (eg. the ELK stack)

LoggingELK LoggingELK is a logging backend library for Apple's swift-log The LoggingELK library provides a logging backend for Apple's apple/swift-log

null 17 Nov 15, 2022
A fast & simple, yet powerful & flexible logging framework for Mac and iOS

CocoaLumberjack CocoaLumberjack is a fast & simple, yet powerful & flexible logging framework for macOS, iOS, tvOS and watchOS. How to get started Fir

null 12.9k Jan 9, 2023
A flexible logging library written in Swift

Puppy Puppy is a flexible logging library written in Swift ?? It supports multiple transports(console, file, syslog, and oslog) as loggers. It not onl

Koichi Yokota 92 Dec 29, 2022
Spy is a flexible, lightweight, multiplatform logging utility written in pure Swift.

Spy is a flexible, lightweight, multiplatform logging utility written in pure Swift. It allows to log with different levels and on different channels. You can define what levels and channels actually are.

AppUnite Sp. z o.o. Spk. 12 Jul 28, 2021
A modern, flexible logging tool

NSLogger NSLogger is a high performance logging utility which displays traces emitted by client applications running on macOS, iOS and Android. It rep

Florent Pillet 5k Dec 22, 2022
Logging utility for Swift and Objective C

Swell - Swift Logging A logging utility for Swift and Objective C. ##Features Turn on logging during development, turn them off when building for the

Hubert Rabago 361 Jun 29, 2022
Bugsnag error monitoring & exception reporter for iOS, macOS, tvOS and watchOS

Bugsnag error monitoring & exception reporter for iOS, macOS, tvOS and watchOS The Bugsnag crash reporter for Cocoa library automatically detects cras

Bugsnag 207 Nov 17, 2022
Customizable Console UI overlay with debug log on top of your iOS App

AEConsole Customizable Console UI overlay with debug log on top of your iOS App AEConsole is built on top of AELog, so you should probably see that fi

Marko Tadić 142 Dec 21, 2022
Swift library for working with Debug Adapter Protocol (DAP)

DebugAdapterProtocol This is a Swift library for interacting with Debug Adapter Protocol. It contains type definitions and utilities useful for both s

Chime 2 Apr 12, 2022
Automate box any value! Print log without any format control symbol! Change debug habit thoroughly!

LxDBAnything Automate box any value! Print log without any format control symbol! Change debug habit thoroughly! Installation You only need drag LxD

DeveloperLx 433 Sep 7, 2022
CleanroomLogger provides an extensible Swift-based logging API that is simple, lightweight and performant

CleanroomLogger CleanroomLogger provides an extensible Swift-based logging API that is simple, lightweight and performant. The API provided by Cleanro

null 1.3k Dec 8, 2022
A simple logging package for Swift

OhMyLog OhMyLog is a simple logging package for Swift. It supports the following features: Six logging levels ( ?? , ?? , ?? , ⚠️ , ?? , ?? ) Display

Junhao Wang 1 Jan 10, 2022
Simple logging for simples needs.

Simple logging for simples needs.

native.dev.br 0 May 30, 2022
A simple, straightforward logging API.

Sequoia A simple, straightforward logging API. Install Add the following to your Package.swift file: import PackageDescription let package = Package(

Jordan Baird 0 Dec 18, 2022
A fancy logger yet lightweight, and configurable. 🖨

?? ?? Important: Printer can only print console logs if you're running an app in the Simulator. If you're running in a real device it will not print a

Hemang 66 Dec 7, 2022