Skip to content

Commit

Permalink
fixing felinepine logging
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion committed Oct 21, 2024
1 parent 0609809 commit 97ae936
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/FelinePine.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: FelinePine
name: FelinePineLogging
on:
push:
branches-ignore:
Expand All @@ -8,7 +8,7 @@ jobs:
build-ubuntu:
name: Build on Ubuntu
env:
PACKAGE_NAME: FelinePine
PACKAGE_NAME: FelinePineLogging
SWIFT_VER: ${{ matrix.swift-version }}
runs-on: ${{ matrix.runs-on }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
build-macos:
name: Build on macOS
env:
PACKAGE_NAME: FelinePine
PACKAGE_NAME: FelinePineLogging
runs-on: ${{ matrix.runs-on }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .periphery.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
retain_public: true
targets:
- FelinePine
- FelinePineLogging
2 changes: 1 addition & 1 deletion Sources/FelinePine/Logger+LoggerCategory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#endif
#endif

#if canImport(os)
#if canImport(os)
extension Logger {
internal init<Category: RawRepresentable>(
subsystem: String,
Expand Down
43 changes: 32 additions & 11 deletions Sources/FelinePine/Logger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,42 @@
// OTHER DEALINGS IN THE SOFTWARE.
//

// swiftlint:disable file_types_order
#if swift(<6.0)
#if canImport(os)
import os
//
// Logger.swift
// FelinePine
//
// Created by Leo Dion.
// Copyright © 2024 BrightDigit.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the “Software”), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
//
#if canImport(os)

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

#endif
#endif

#if canImport(os)
/// os.Logger
public typealias Logger = os.Logger
#endif
// swiftlint:enable file_types_order
2 changes: 1 addition & 1 deletion Tests/FelinePineTests/FelinePineTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
//

@testable import FelinePine
@testable import FelinePineLogging
import XCTest

internal final class FelinePineTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion Tests/FelinePineTests/LoggingSystemTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
//

@testable import FelinePine
@testable import FelinePineLogging
import XCTest

internal final class LoggingSystemTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion Tests/FelinePineTests/Mocks/MockSystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
//

@testable import FelinePine
@testable import FelinePineLogging
import XCTest

internal struct MockSystem: LoggingSystem {
Expand Down
2 changes: 1 addition & 1 deletion Tests/FelinePineTests/Mocks/MockType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
//

@testable import FelinePine
@testable import FelinePineLogging
import XCTest

internal struct MockType: FelinePineProtocol {
Expand Down
2 changes: 1 addition & 1 deletion project.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: FelinePine
name: FelinePineLogging
settings:
LINT_MODE: ${LINT_MODE}
packages:
Expand Down

0 comments on commit 97ae936

Please sign in to comment.