Caps-iOS/CapCollector/Logger.swift

36 lines
597 B
Swift
Raw Normal View History

2019-03-15 13:19:19 +01:00
//
// Logger.swift
// CapFinder
//
// Created by User on 11.04.18.
// Copyright © 2018 User. All rights reserved.
//
import Foundation
protocol Logger {
static var logToken: String { get }
}
extension Logger {
func error(_ message: String) {
print(Self.logToken + " ERROR: " + message)
}
func event(_ message: String) {
print(Self.logToken + " " + message)
}
static func error(_ message: String) {
print(logToken + " ERROR: " + message)
}
static func event(_ message: String) {
print(logToken + " " + message)
}
}