Skip to content

Releases: bennokress/PrettyLog

Restore compatibility with Swift 5

27 May 14:16
88fbeb7
Compare
Choose a tag to compare

What's Changed

  • Restore compatibility with Swift 5

Full Changelog: 2.0.3...2.0.4

Separate Demo App

27 May 08:03
917c09e
Compare
Choose a tag to compare

What's Changed

  • Remove the Demo App Product and Target from the Package Definition

Full Changelog: 2.0.2...2.0.3

Small Improvements for v2

26 May 15:13
136e9e4
Compare
Choose a tag to compare

What's Changed

  • Throwing a warning now if no LogTarget is defined upon trying to log a statement
  • Improve README

Full Changelog: 2.0.0...2.0.2

2.0.0

25 May 20:21
1b11526
Compare
Choose a tag to compare

PrettyLog v2 introduces several new features while maintaining backward compatibility except for one small breaking change. Here's what's new and what you need to update:

New Features

1. New Semantic Log Levels

Three new log levels have been added with environment-specific semantics. In our team at work this has been established to make clear which level is appropriate for a log message.

  • 🟤 .xcode - identical to .debug
  • 🔵 .staging - identical to .verbose
  • 🟢 .production - identical to .info

Additionally Key Event Logging was added which is meant to always log without sensitive data, perhaps even to another system, to gain insights and generate statistics.

  • 📊 .keyEvent - Highest priority for critical events (📊)

2. Sensitive Data Logging Support

All logging methods except logK now support an optional sensitiveMessages parameter for data that should only be logged in certain environments (configurable for each LogTarget):

// Before (1.x)
logI("Login", "User ID: \(userID), category: .user)

// After (2.0) - with sensitive data support we could for example log the password to the console, but not in production
logI("Login", "User ID: \(userID), sensitiveMessages: "Password: \(password)", category: .user)

3. Swift 6.1 Compatibility

PrettyLog is now officially compatible with Swift 6.1.

Breaking Change

Log Target Protocol Update

With the new sensitive data, an additional parameter is needed to define a LogTarget that defines if the target should log or omit sensitive information.

public protocol LogTarget {

    /// If `false`, Strings passed to the `log` method as sensitive data will be discarded.
    var canLogSensitiveInformation: Bool { get }

    // …

}

Optional Changes

  • All existing logD(), logV(), logI(), logW(), logE() calls continue to work unchanged, but can be adjusted to the new semantic notation
  • Global log method definitions from the "Import once" pattern work as before, but can be expanded to support the new functionalities

Full Changelog: 1.1.1...2.0.0

Switch Debug and Verbose Priority Levels

26 Nov 16:27
Compare
Choose a tag to compare
1.1.1

Switch Debug and Verbose Priority Levels

Increase Customization Options

26 Jul 13:11
Compare
Choose a tag to compare
1.1.0

Increase Platform Support

Add customization option to LogLevel

25 Jul 14:11
Compare
Choose a tag to compare
1.0.4

Add customization option to LogLevel

Prepare Swift Package Index Release

24 Jul 16:34
Compare
Choose a tag to compare
1.0.2

Prepare Swift Package Index Release

Improved Readme

24 Jul 16:32
Compare
Choose a tag to compare
1.0.1

Extend Read Me with Custom Log Categories

Initial Release

22 Jul 17:45
Compare
Choose a tag to compare
1.0.0

Initial Release