Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Custom CleanroomLogger Channel demo
Original issues : [CleanroomLogger/issues/37](
extension Log {
static func setup() {
Log.enable(debugMode: true)
Log.sqlite = MyLogChannel(prefix: "Sqlite") // enable your channel or using Xcode console filter
extension Log {
// Adapter Class
class MyLogChannel{
let prefix:String
init(prefix:String) {
self.prefix = prefix
func info(_ msg: String?, function: String = #function, filePath: String = #file, fileLine: Int = #line) {
guard let msg = msg else {return} + " : " + msg, function: function, filePath: filePath, fileLine: fileLine)
static var sqlite:MyLogChannel?
declare a global const `LogSqlite`
let LogSqlite = Log.sqlite"hehe")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.