From f289e9e7dd72238690cc83159f4b6411b6354c83 Mon Sep 17 00:00:00 2001 From: Shial Date: Thu, 19 Oct 2017 15:55:27 +1100 Subject: [PATCH] [1.0.3] Default terminal setting due to Xcode flag --- README.md | 8 +++++++- Sources/SLLog/SLLogConsole.swift | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9b1418a..8625241 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,13 @@ can you can use `LogProvider` build in method send. To send your log via SLLog. Default console log: ```swift isDebug: Bool = true, -isTerminal: Bool = false, +isTerminal: Bool = { + #if Xcode + return false + #else + return true + #endif + }(), minProductionLogType: UInt = 3 logFormat: String = ":d :t :f::l :m", dateFormat: String? = nil, diff --git a/Sources/SLLog/SLLogConsole.swift b/Sources/SLLog/SLLogConsole.swift index d9eca23..b713774 100644 --- a/Sources/SLLog/SLLogConsole.swift +++ b/Sources/SLLog/SLLogConsole.swift @@ -38,7 +38,13 @@ public struct LogColor { public class SLLogConsole: LogHandler { public init(isDebug: Bool = true, - isTerminal: Bool = false, + isTerminal: Bool = { + #if Xcode + return false + #else + return true + #endif + }(), minProductionLogType: UInt = 3, logFormat: String = ":d :t :f::l :m", dateFormat: String? = nil,