Skip to content

Commit

Permalink
fixing logging for BitnessServer
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion committed Oct 21, 2024
1 parent 2fda1b8 commit 8665488
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 25 deletions.
11 changes: 1 addition & 10 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
{
"originHash" : "da1b8d53747ed3a05d8e36b2882c3cb3a39ecccae3fbd0dea15e8ea56e8342a4",
"originHash" : "8c1ea0038d0df7a497986fcd4d48362febb400754dc0930cc30160975008e1d8",
"pins" : [
{
"identity" : "felinepine",
"kind" : "remoteSourceControl",
"location" : "https://github.com/brightdigit/FelinePine.git",
"state" : {
"revision" : "d2ed8f98a67e45bfa89d3947ea99fcf9b5260064",
"version" : "1.0.0-beta.4"
}
},
{
"identity" : "swift-log",
"kind" : "remoteSourceControl",
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let package = Package(
name: "FelinePineLogging",
platforms: [.iOS(.v14), .watchOS(.v7), .macOS(.v11)],
dependencies: [
.package(url: "https://github.com/brightdigit/FelinePine.git", from: "1.0.0-beta.4"),
.package(path: "../FelinePine"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0")
],
products: [
Expand Down
2 changes: 1 addition & 1 deletion [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/brightdigit/FelinePine.git", from: "1.0.0-beta.4"),
.package(path: "../FelinePine"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0")
],
targets: [
Expand Down
2 changes: 1 addition & 1 deletion Sources/FelinePineLogging/Loggable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import Logging
import Foundation

//#if canImport(os) || canImport(Logging)
//#if canImport(os)
// public typealias FelinePineProtocol = Feline & Pine
//#else
// public typealias FelinePineProtocol = Feline
Expand Down
2 changes: 1 addition & 1 deletion Sources/FelinePineLogging/LoggingSystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
// /// Subsystem to use for each ``Logger``.
// /// By default, this is `Bundle.main.bundleIdentifier`.
// static var subsystem: String { get }
// #if canImport(os) || canImport(Logging)
// #if canImport(os)
// /// Fetches the correct logger based on the category.
// static func logger(forCategory category: Category) -> Logger
// #endif
Expand Down
10 changes: 1 addition & 9 deletions Sources/FelinePineLogging/Pine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,12 @@
import Foundation

#if swift(<6.0)
#if canImport(os)
import os
#elseif canImport(Logging)
import Logging
#endif
#else
#if canImport(os)
public import os
#elseif canImport(Logging)
public import Logging
#endif
#endif

#if canImport(os) || canImport(Logging)
#if canImport(Logging)
/// Defines a shared logger for the type.
///
/// Provides a shared ``Logger`` to use in this type.
Expand Down
2 changes: 1 addition & 1 deletion Tests/FelinePineLoggingTests/FelinePineTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import XCTest

internal final class FelinePineTests: XCTestCase {
internal func testLogger() throws {
#if canImport(os) || canImport(Logging)
#if canImport(os)
_ = MockType.logger
XCTAssert(true)
#else
Expand Down
2 changes: 1 addition & 1 deletion Tests/FelinePineLoggingTests/LoggingSystemTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ internal final class LoggingSystemTests: XCTestCase {
}

internal func testLogger() throws {
#if canImport(os) || canImport(Logging)
#if canImport(os)
for category in MockSystem.Category.allCases {
_ = MockSystem.logger(forCategory: category)
}
Expand Down

0 comments on commit 8665488

Please sign in to comment.