Skip to content

Commit

Permalink
Reduce instance variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Shial committed Nov 22, 2017
1 parent 37400a5 commit ed5370f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<a href="https://raw.githubusercontent.com/shial4/SLLog/master/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License" />
</a>
<a href="https://travis-ci.org/shial4 /SLLog">
<img src="https://travis-ci.org/shial4 /SLLog.svg?branch=master" alt="TravisCI" />
<a href="https://travis-ci.org/SLLog/SLLog">
<img src="https://travis-ci.org/SLLog/SLLog.svg?branch=master" alt="TravisCI" />
</a>
<a href="https://codebeat.co/projects/github-com-sllog-sllog-master">
<img src="https://codebeat.co/badges/34b30a6f-29dd-4870-8f95-922267cef054" alt="Codebeat" />
Expand Down
7 changes: 3 additions & 4 deletions Sources/SLLog/SLLogConsole.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ public class SLLogConsole: LogHandler {
#endif
}()
public var minProductionLogType: UInt = 3
public var logFormat: String = ":d :t :f::l :m"
public var dateFormat: String?
public var format: (logFormat: String, dateFormat: String?) = (":d :t :f::l :m", nil)
public var logColors: [SLLog.LogType:LogColor] = [
SLLog.LogType.verbose:LogColor(TerminalColor.lightGray, "☑️"),
SLLog.LogType.info:LogColor(TerminalColor.lightCyan, "Ⓜ️"),
Expand All @@ -65,9 +64,9 @@ public class SLLogConsole: LogHandler {
public init(_ config: Configuration = Configuration()) {
self.mode = config.mode
self.minProductionLogType = config.minProductionLogType
self.logFormat = config.logFormat
self.logFormat = config.format.logFormat
self.logColors = config.logColors
if let format = config.dateFormat {
if let format = config.format.dateFormat {
self.formattert.dateFormat = format
}
}
Expand Down

0 comments on commit ed5370f

Please sign in to comment.