Skip to content

Simple iOS logger. Print log with time stamp, log level, file name, function name, and line number. Additionally, level icon is added at the head of the log to make you recognize level easily.

Notifications You must be signed in to change notification settings

aac1109/SimLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

SimLogger

Simple iOS logger in Swift. Print log with time stamp, log level, file name, function name, and line number. Additionally, level icon is added at the head of the log to make you recognize level easily.

##Example Example

##Usage ###Step 1 Drag Simlogger.swift into your project

###Step 2 In AppDelegate

  • Get the static instance of SimLogger
let log = SimLogger.getInstance()
  • Set log level

There are four levels from low to high: Debug, Info, Warning, Error. Log will be printed with the log level higher or equal to the setting level.

In

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) 

Set log level with

log.setLevel(LogLevel.Debug)

###Step 3 General use in any class

  • Get the static instance of SimLogger
let log = SimLogger.getInstance()
  • There are four methods you can use
log.debug("It's debug")
log.info("It's info")
log.warning("It's warning")
log.error("It's error”)

#####Enjoy it!

About

Simple iOS logger. Print log with time stamp, log level, file name, function name, and line number. Additionally, level icon is added at the head of the log to make you recognize level easily.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages