Skip to content

A simple Swift logger that provides timestamp, filename, line number, and function context when logging.

Notifications You must be signed in to change notification settings

ryan0n/LoggerManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

LoggerManager

A simple Swift logger to provide timestamp, filename, line number, and function context when logging.

Example:

import Foundation

class myClass {
    private let loggerManager = LoggerManager()
    
    init() {
        exampleMethod()
    }
    
    func exampleMethod() {
        loggerManager.info("example info message")
        loggerManager.error("example error message")
        loggerManager.warning("example warning message")        
        loggerManager.info("example info message")
    }
}

Log output:

info    : 2018-03-25 12:29:40.7290 : myClass.swift : 11 : someMethod() : example info message
error   : 2018-03-25 12:29:40.7291 : myClass.swift : 12 : someMethod() : example error message
warning : 2018-03-25 12:29:40.7292 : myClass.swift : 13 : someMethod() : example warning message
info    : 2018-03-25 12:29:40.7293 : myClass.swift : 14 : someMethod() : example info message

About

A simple Swift logger that provides timestamp, filename, line number, and function context when logging.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages