Skip to content

Commit 2bf5e8c

Browse files
authored
Merge pull request #5 from jnewc/feature/log-cache-public
Log cache entry public interface
2 parents 4f4b434 + 6d7333a commit 2bf5e8c

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
before_install:
22
- pod repo update > /dev/null
33
script:
4-
- xcodebuild -destination 'platform=iOS Simulator,name=iPhone 7' -workspace Cosmic.xcworkspace -scheme Cosmic -enableCodeCoverage YES test
4+
- xcodebuild -destination 'platform=iOS Simulator,name=iPhone 8' -workspace Cosmic.xcworkspace -scheme Cosmic -enableCodeCoverage YES build test
55
after_script:
6-
- bash <(curl -s https://codecov.io/bash)
6+
- bash <(curl -s https://codecov.io/bash) -J Cosmic
77

88

99
language: objective-c

Cosmic.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "Cosmic"
4-
s.version = "4.2.0"
4+
s.version = "4.3.0"
55
s.summary = "A log reporting framework written in Swift"
66

77
s.description = <<-DESC

Cosmic.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
04A4A91E1EFB1FBA00EBD44E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
110110
04A4A9201EFB1FBA00EBD44E /* CompositeLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = CompositeLogger.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
111111
04A4A9211EFB1FBA00EBD44E /* HTTPLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = HTTPLogger.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
112-
04A4A9221EFB1FBA00EBD44E /* MemoryLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = MemoryLogger.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
112+
04A4A9221EFB1FBA00EBD44E /* MemoryLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = MemoryLogger.swift; sourceTree = "<group>"; };
113113
04A4A9231EFB1FBA00EBD44E /* PrintLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = PrintLogger.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
114114
04A4A9251EFB1FBA00EBD44E /* Commons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Commons.swift; sourceTree = "<group>"; };
115115
04A4A9261EFB1FBA00EBD44E /* DataUtility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataUtility.swift; sourceTree = "<group>"; };

Sources/Cosmic/Base/LogCache.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88

99
import Foundation
1010

11-
struct LogCacheEntry {
11+
public struct LogCacheEntry {
1212

13-
let logLevel: LogLevel
13+
public let logLevel: LogLevel
1414

15-
let message: String
15+
public let message: String
1616

17-
let metadata: LogMetadata
17+
public let metadata: LogMetadata
1818

19-
let created: Date = Date()
19+
public let created: Date = Date()
2020

2121
}
2222

2323

2424
public class LogCache {
2525

26-
fileprivate var entries: [LogCacheEntry] = []
26+
public private(set) var entries: [LogCacheEntry] = []
2727

2828
init() { }
2929

@@ -32,7 +32,7 @@ public class LogCache {
3232
entries.append(entry)
3333
}
3434

35-
func entriesFor(logLevel: LogLevel) -> [LogCacheEntry] {
35+
public func entriesFor(logLevel: LogLevel) -> [LogCacheEntry] {
3636
return entries.filter { $0.logLevel == logLevel }
3737
}
3838

0 commit comments

Comments
 (0)