Skip to content

Commit 08571f1

Browse files
committed
able to force production logging for one specific message.
1 parent 40c99f4 commit 08571f1

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

.swift-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Source/Print/Print.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public extension Stuff {
4747
return "🚫"
4848
case .fatal:
4949
return "🆘"
50-
case .none, .productionLogAll:
50+
case .productionLogAll:
51+
return "🚧"
52+
case .none:
5153
return ""
5254
}
5355
}
@@ -71,7 +73,7 @@ public extension Stuff {
7173
let traceOutput: String = trace.map { "\t\t\($0)" }.reduce("\n") { "\($0)\n\($1)" }
7274
let output: String = object is Error ? "\((object as! Error).localizedDescription)\(traceOutput)" : "\(object)"
7375
let logText = "\n\(level.description()) .\(level)\(dateFormatter.string(from: Foundation.Date())) 📱 \(process.processName) [\(process.processIdentifier):\(threadId)] 📂 \(file)(\(line)) ⚙️ \(funcname) ➡️\r\t\(output)"
74-
if Stuff.minimumLogLevel == .productionLogAll {
76+
if Stuff.minimumLogLevel == .productionLogAll || level == .productionLogAll {
7577
if #available(iOS 10.0, *) {
7678
let log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "Stuff")
7779
os_log("%{public}@", log: log, logText)

Stuff.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "Stuff"
3-
s.version = "1.1.1"
3+
s.version = "1.1.2"
44
s.summary = "Too small for a library, too important to just forget"
55

66
s.description = <<-EOS

Stuff.xcworkspace/contents.xcworkspacedata

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)