diff --git a/.DS_Store b/.DS_Store index a1a605e..a49e7ea 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/README.md b/README.md index e7d2aec..f30e0d4 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![GitHub license](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/shogo4405/Logboard/blob/master/LICENSE.md) * Simple logging framework for your framework project. -* [API Documentation](https://shogo4405.github.io/Logboard/) +* [API Documentation](https://shogo4405.github.io/Logboard/documentation/logboard/) ## Usage ```swift @@ -32,7 +32,7 @@ source 'https://github.com/CocoaPods/Specs.git' use_frameworks! def import_pods -pod 'Logboard', '~> 2.3.0' +pod 'Logboard', '~> 2.3.1' end target 'Your Target' do @@ -42,7 +42,7 @@ end ``` ### Carthage ``` -github "shogo4405/Logboard" ~> 2.3.0 +github "shogo4405/Logboard" ~> 2.3.1 ``` ## Appenders diff --git a/Sources/Logboard/ConsoleAppender.swift b/Sources/Logboard/ConsoleAppender.swift index 5527a29..7492473 100644 --- a/Sources/Logboard/ConsoleAppender.swift +++ b/Sources/Logboard/ConsoleAppender.swift @@ -2,6 +2,10 @@ import Foundation /// The ConsoleAppender class can output your xcode console with print function. public class ConsoleAppender: LBLoggerAppender { + /// Creates a ConsoleAppender instance. + public init() { + } + public func append(_ logboard: LBLogger, level: LBLogger.Level, message: [Any], file: StaticString, function: StaticString, line: Int) { print(LBLogger.dateFormatter.string(from: Date()), "[\(level)]", "[\(logboard.identifier)]", "[\(filename(file.description)):\(line)]", function, ">", message.map({ String(describing: $0) }).joined(separator: "")) } diff --git a/Sources/Logboard/MultiAppender.swift b/Sources/Logboard/MultiAppender.swift index 811b9ef..cc12aa3 100644 --- a/Sources/Logboard/MultiAppender.swift +++ b/Sources/Logboard/MultiAppender.swift @@ -12,6 +12,10 @@ public class MultiAppender: LBLoggerAppender { /// The appenders. public var appenders: [LBLoggerAppender] = [] + /// Creates a MultIAppender instance. + public init() { + } + public func append(_ logboard: LBLogger, level: LBLogger.Level, message: [Any], file: StaticString, function: StaticString, line: Int) { for appender in appenders { appender.append(logboard, level: level, message: message, file: file, function: function, line: line) diff --git a/Sources/Logboard/NullAppender.swift b/Sources/Logboard/NullAppender.swift index fb93058..f669ac4 100644 --- a/Sources/Logboard/NullAppender.swift +++ b/Sources/Logboard/NullAppender.swift @@ -2,6 +2,8 @@ import Foundation /// The NullAppender class does output no message. public class NullAppender: LBLoggerAppender { + public static let shared = NullAppender() + public func append(_ logboard: LBLogger, level: LBLogger.Level, message: [Any], file: StaticString, function: StaticString, line: Int) { } diff --git a/Sources/Logboard/SocketAppender.swift b/Sources/Logboard/SocketAppender.swift index 6f7b179..fd6ec82 100644 --- a/Sources/Logboard/SocketAppender.swift +++ b/Sources/Logboard/SocketAppender.swift @@ -4,6 +4,10 @@ import Foundation public class SocketAppender: LBLoggerAppender { private var socket: NetSocket = NetSocket() + /// Creates a SocketAppende instance. + public init() { + } + /// Connects the Logboard Console service. public func connect(_ name: String, port: Int) { socket.connect(withName: name, port: port)