Skip to content

Commit

Permalink
ExistentialAny
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo4405 committed Sep 3, 2023
1 parent a62f148 commit 6a7cbf5
Show file tree
Hide file tree
Showing 79 changed files with 120 additions and 114 deletions.
4 changes: 2 additions & 2 deletions Logboard.podspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Pod::Spec.new do |s|

s.name = "Logboard"
s.version = "2.4.0"
s.version = "2.4.1"
s.summary = "Simple Logging framework"
s.swift_version = "5.0"
s.swift_version = "5.8"

s.description = <<-DESC
Simple Logging framework for your framework project.
Expand Down
14 changes: 11 additions & 3 deletions Logboard.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@
293875381F35D45B009F4B30 = {
CreatedOnToolsVersion = 8.3.3;
LastSwiftMigration = 1100;
ProvisioningStyle = Automatic;
};
};
};
Expand Down Expand Up @@ -332,7 +331,10 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2.4.1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand All @@ -346,12 +348,13 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 2.4.0;
MARKETING_VERSION = 2.4.1;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
OTHER_SWIFT_FLAGS = "-enable-upcoming-feature ExistentialAny";
PRODUCT_BUNDLE_IDENTIFIER = com.github.shogo4405.Logboard;
PRODUCT_NAME = Logboard;
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = "";
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator xros xrsimulator";
Expand All @@ -371,7 +374,10 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2.4.1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand All @@ -385,12 +391,14 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 2.4.0;
MARKETING_VERSION = 2.4.1;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "-enable-upcoming-feature ExistentialAny";
PRODUCT_BUNDLE_IDENTIFIER = com.github.shogo4405.Logboard;
PRODUCT_NAME = Logboard;
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = "";
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator xros xrsimulator";
Expand Down
42 changes: 20 additions & 22 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
{
"object": {
"pins": [
{
"package": "SwiftDocCPlugin",
"repositoryURL": "https://github.com/apple/swift-docc-plugin",
"state": {
"branch": null,
"revision": "9b1258905c21fc1b97bf03d1b4ca12c4ec4e5fda",
"version": "1.2.0"
}
},
{
"package": "SymbolKit",
"repositoryURL": "https://github.com/apple/swift-docc-symbolkit",
"state": {
"branch": null,
"revision": "b45d1f2ed151d057b54504d653e0da5552844e34",
"version": "1.0.0"
}
"pins" : [
{
"identity" : "swift-docc-plugin",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-docc-plugin",
"state" : {
"revision" : "26ac5758409154cc448d7ab82389c520fa8a8247",
"version" : "1.3.0"
}
]
},
"version": 1
},
{
"identity" : "swift-docc-symbolkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-docc-symbolkit",
"state" : {
"revision" : "b45d1f2ed151d057b54504d653e0da5552844e34",
"version" : "1.0.0"
}
}
],
"version" : 2
}
12 changes: 6 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ let package = Package(
.library(name: "Logboard", targets: ["Logboard"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0")
],
targets: [
.target(
name: "Logboard",
dependencies: [],
exclude: [
"Info.plist"
]
name: "Logboard",
dependencies: [],
exclude: [
"Info.plist"
]
)
]
)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ logger.error("error")
## Requirements
|-|iOS|macOS|tvOS|watchOS|visionOS|Xcode|Swift|
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
|2.4.0+|12.0+|10.13+|12.0+|4.0|1.0+|15.0+|5.3|
|2.4.1+|12.0+|10.13+|12.0+|4.0|1.0+|15.0+|5.3|
|2.3.0+|11.0+|10.13+|11.0+|4.0|-|14.0+|5.3|

## Installation
Expand All @@ -32,7 +32,7 @@ source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!

def import_pods
pod 'Logboard', '~> 2.4.0'
pod 'Logboard', '~> 2.4.1'
end

target 'Your Target' do
Expand All @@ -42,7 +42,7 @@ end
```
### Carthage
```
github "shogo4405/Logboard" ~> 2.4.0
github "shogo4405/Logboard" ~> 2.4.1
```

## Appenders
Expand Down
2 changes: 1 addition & 1 deletion Sources/Logboard/ConsoleAppender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ConsoleAppender: LBLoggerAppender {
print(LBLogger.dateFormatter.string(from: Date()), "[\(level)]", "[\(logboard.identifier)]", "[\(filename(file.description)):\(line)]", function, ">", message.map({ String(describing: $0) }).joined(separator: ""))
}

public func append(_ logboard: LBLogger, level: LBLogger.Level, format: String, arguments: CVarArg, file: StaticString, function: StaticString, line: Int) {
public func append(_ logboard: LBLogger, level: LBLogger.Level, format: String, arguments: any CVarArg, file: StaticString, function: StaticString, line: Int) {
print(LBLogger.dateFormatter.string(from: Date()), "[\(level)]", "[\(logboard.identifier)]", "[\(filename(file.description)):\(line)]", function, ">", String(format: format, arguments))
}
}
10 changes: 5 additions & 5 deletions Sources/Logboard/LBLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public class LBLogger {
}

/// Writes a trace message to the appender with a format string.
public func trace(format: String, arguments: CVarArg, file: StaticString = #file, function: StaticString = #function, line: Int = #line) {
public func trace(format: String, arguments: any CVarArg, file: StaticString = #file, function: StaticString = #function, line: Int = #line) {
guard isEnabledFor(level: .trace) else { return }
appender.append(self, level: .trace, format: format, arguments: arguments, file: file, function: function, line: line)
}
Expand All @@ -107,7 +107,7 @@ public class LBLogger {
}

/// Writes a debug message to the appender with a format string.
public func debug(format: String, arguments: CVarArg, file: StaticString = #file, function: StaticString = #function, line: Int = #line) {
public func debug(format: String, arguments: any CVarArg, file: StaticString = #file, function: StaticString = #function, line: Int = #line) {
guard isEnabledFor(level: .debug) else { return }
appender.append(self, level: .debug, format: format, arguments: arguments, file: file, function: function, line: line)
}
Expand All @@ -119,7 +119,7 @@ public class LBLogger {
}

/// Writes a informative message to the appender with a format string.
public func info(format: String, arguments: CVarArg, file: StaticString = #file, function: StaticString = #function, line: Int = #line) {
public func info(format: String, arguments: any CVarArg, file: StaticString = #file, function: StaticString = #function, line: Int = #line) {
guard isEnabledFor(level: .info) else { return }
appender.append(self, level: .info, format: format, arguments: arguments, file: file, function: function, line: line)
}
Expand All @@ -131,7 +131,7 @@ public class LBLogger {
}

/// Writes a warning message to the appender with a format string.
public func warn(format: String, arguments: CVarArg, file: StaticString = #file, function: StaticString = #function, line: Int = #line) {
public func warn(format: String, arguments: any CVarArg, file: StaticString = #file, function: StaticString = #function, line: Int = #line) {
guard isEnabledFor(level: .warn) else { return }
appender.append(self, level: .warn, format: format, arguments: arguments, file: file, function: function, line: line)
}
Expand All @@ -143,7 +143,7 @@ public class LBLogger {
}

/// Writes a error message to the appender with a format string.
public func error(format: String, arguments: CVarArg, file: StaticString = #file, function: StaticString = #function, line: Int = #line) {
public func error(format: String, arguments: any CVarArg, file: StaticString = #file, function: StaticString = #function, line: Int = #line) {
guard isEnabledFor(level: .error) else { return }
appender.append(self, level: .error, format: format, arguments: arguments, file: file, function: function, line: line)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Logboard/LBLoggerAppender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public protocol LBLoggerAppender {
func append(_ logboard: LBLogger, level: LBLogger.Level, message: [Any], file: StaticString, function: StaticString, line: Int)

/// Appends a logging message with a format sting.
func append(_ logboard: LBLogger, level: LBLogger.Level, format: String, arguments: CVarArg, file: StaticString, function: StaticString, line: Int)
func append(_ logboard: LBLogger, level: LBLogger.Level, format: String, arguments: any CVarArg, file: StaticString, function: StaticString, line: Int)
}
2 changes: 1 addition & 1 deletion Sources/Logboard/MultiAppender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class MultiAppender: LBLoggerAppender {
}
}

public func append(_ logboard: LBLogger, level: LBLogger.Level, format: String, arguments: CVarArg, file: StaticString, function: StaticString, line: Int) {
public func append(_ logboard: LBLogger, level: LBLogger.Level, format: String, arguments: any CVarArg, file: StaticString, function: StaticString, line: Int) {
for appender in appenders {
appender.append(logboard, level: level, format: format, arguments: arguments, file: file, function: function, line: line)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Logboard/NullAppender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ public class NullAppender: LBLoggerAppender {
public func append(_ logboard: LBLogger, level: LBLogger.Level, message: [Any], file: StaticString, function: StaticString, line: Int) {
}

public func append(_ logboard: LBLogger, level: LBLogger.Level, format: String, arguments: CVarArg, file: StaticString, function: StaticString, line: Int) {
public func append(_ logboard: LBLogger, level: LBLogger.Level, format: String, arguments: any CVarArg, file: StaticString, function: StaticString, line: Int) {
}
}
2 changes: 1 addition & 1 deletion Sources/Logboard/OSLoggerAppender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class OSLoggerAppender: LBLoggerAppender {
}
}

public func append(_ logboard: LBLogger, level: LBLogger.Level, format: String, arguments: CVarArg, file: StaticString, function: StaticString, line: Int) {
public func append(_ logboard: LBLogger, level: LBLogger.Level, format: String, arguments: any CVarArg, file: StaticString, function: StaticString, line: Int) {
let message =
"[\(filename(file.description)):\(line)]" +
function.description +
Expand Down
2 changes: 1 addition & 1 deletion Sources/Logboard/SocketAppender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class SocketAppender: LBLoggerAppender {
}
}

public func append(_ logboard: LBLogger, level: LBLogger.Level, format: String, arguments: CVarArg, file: StaticString, function: StaticString, line: Int) {
public func append(_ logboard: LBLogger, level: LBLogger.Level, format: String, arguments: any CVarArg, file: StaticString, function: StaticString, line: Int) {
let strings: [String] = [
LBLogger.dateFormatter.string(from: Date()),
level.description,
Expand Down
Loading

0 comments on commit 6a7cbf5

Please sign in to comment.