File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,26 @@ import Foundation
11
11
12
12
public final class ConsoleLogHandler : LogHandler {
13
13
14
- public let identifier = " com.Madimo.Logger.ConsoleLogHandler "
14
+ public let identifier : String
15
15
public var isEnabled = true
16
16
public lazy var filter : LogFilter = AllAcceptLogFilter ( )
17
- public lazy var logFormatter : LogFormatter = DefaultLogFormatter ( )
18
17
19
- public init ( ) {
20
-
18
+ public lazy var logFormatter : LogFormatter = {
19
+ let formatter = DefaultLogFormatter ( )
20
+ formatter. showFile = false
21
+ formatter. showLine = false
22
+ formatter. showColumn = false
23
+ formatter. showFunction = false
24
+ formatter. dateFormatter = {
25
+ let formatter = DateFormatter ( )
26
+ formatter. dateFormat = " yyyy-MM-dd HH:mm:ss.SSS "
27
+ return formatter
28
+ } ( )
29
+ return formatter
30
+ } ( )
31
+
32
+ public init ( identifier: String = " com.Madimo.Logger.ConsoleLogHandler " ) {
33
+ self . identifier = identifier
21
34
}
22
35
23
36
public func write( _ log: Log ) {
You can’t perform that action at this time.
0 commit comments