Skip to content

shuningzhou/SLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SimpleLogger

SimpleLogger is a logging module for iOS that allows logging to a file and the console at the same time. It is efficient and super easy to use.

How To Use

Just replace NSLog statements with SLog statements.

Configuration

[SLogger sharedLogger].maxNumberOfLogFiles = 3;
[SLogger sharedLogger].maxSizeOfLogFile = 50 * SLOG_KB;
[SLogger sharedLogger].logLevel = SLogLevelVerbose;

Logging

SLogError(@"Logging level = %@", @"Error");
SLogInfo(@"Logging level = %@", @"Info");
SLogVerbose(@"Logging level = %@", @"Verbose");

Reading & Removing History Logs

[[SLogger sharedLogger] getContentUpTo:100 * SLOG_KB completionHandler:^(NSString *content, NSArray *filesRead) {
        
        NSLog(@"Content = %@", content);
        NSLog(@"FilesRead = %@", filesRead);
        
        [[SLogger sharedLogger] removeFiles:filesRead];
    }];

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published