├── .hgignore ├── LumberjackLogo.png ├── Demos ├── CaptureASL │ ├── CaptureASL │ │ ├── en.lproj │ │ │ └── InfoPlist.strings │ │ ├── AppDelegate.h │ │ ├── ViewController.h │ │ ├── main.m │ │ ├── CaptureASL-Prefix.pch │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── LaunchImage.launchimage │ │ │ │ └── Contents.json │ │ ├── AppDelegate.m │ │ ├── ViewController.m │ │ └── CaptureASL-Info.plist │ ├── CaptureASLTests │ │ ├── en.lproj │ │ │ └── InfoPlist.strings │ │ ├── CaptureASLTests.m │ │ └── CaptureASLTests-Info.plist │ └── Podfile ├── ContextFilter │ ├── English.lproj │ │ └── InfoPlist.strings │ ├── MyContextFilter.h │ ├── ThirdPartyFramework.h │ ├── ContextFilter_Prefix.pch │ ├── main.m │ ├── Podfile │ ├── ContextFilterAppDelegate.h │ ├── MyContextFilter.m │ ├── ContextFilter-Info.plist │ └── ThirdPartyFramework.m ├── CustomFormatters │ ├── English.lproj │ │ └── InfoPlist.strings │ ├── TestFormatter.h │ ├── CustomFormatters_Prefix.pch │ ├── main.m │ ├── CustomFormattersAppDelegate.h │ ├── Podfile │ ├── ReadMe.txt │ ├── TestFormatter.m │ ├── CustomFormattersAppDelegate.m │ └── CustomFormatters-Info.plist ├── CustomLogLevels │ ├── English.lproj │ │ └── InfoPlist.strings │ ├── CustomLogLevels_Prefix.pch │ ├── main.m │ ├── CustomLogLevelsAppDelegate.h │ ├── Podfile │ ├── ReadMe.txt │ ├── CustomLogLevelsAppDelegate.m │ └── CustomLogLevels-Info.plist ├── GlobalLogLevel │ ├── English.lproj │ │ └── InfoPlist.strings │ ├── MyLogging.h │ ├── Stuff.h │ ├── GlobalLogLevel_Prefix.pch │ ├── GlobalLogLevel.xcodeproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── main.m │ ├── Podfile │ ├── Stuff.m │ ├── GlobalLogLevelAppDelegate.h │ ├── GlobalLogLevelAppDelegate.m │ └── GlobalLogLevel-Info.plist ├── LogFileCompressor │ ├── English.lproj │ │ └── InfoPlist.strings │ ├── LogFileCompressor_Prefix.pch │ ├── CompressingLogFileManager.h │ ├── main.m │ ├── ReadMe.txt │ ├── Podfile │ ├── LogFileCompressorAppDelegate.h │ ├── LogFileCompressor-Info.plist │ └── LogFileCompressorAppDelegate.m ├── NonArcTest │ ├── NonArcTest │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── Credits.rtf │ │ ├── NonArcTest-Prefix.pch │ │ ├── main.m │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ └── NonArcTest-Info.plist │ └── Podfile ├── OverflowTestMac │ ├── English.lproj │ │ └── InfoPlist.strings │ ├── SlowLogger.h │ ├── OverflowTestMac_Prefix.pch │ ├── SlowLogger.m │ ├── main.m │ ├── Podfile │ ├── OverflowTestMacAppDelegate.h │ ├── ReadMe.txt │ └── OverflowTestMac-Info.plist ├── RollingTestMac │ ├── English.lproj │ │ └── InfoPlist.strings │ ├── ReadMe.txt │ ├── RollingTestMac_Prefix.pch │ ├── main.m │ ├── Podfile │ ├── RollingTestMacAppDelegate.h │ ├── RollingTestMac-Info.plist │ └── RollingTestMacAppDelegate.m ├── FineGrainedLogging │ ├── English.lproj │ │ └── InfoPlist.strings │ ├── TimerOne.h │ ├── TimerTwo.h │ ├── FineGrainedLogging_Prefix.pch │ ├── main.m │ ├── Podfile │ ├── FineGrainedLoggingAppDelegate.h │ ├── FineGrainedLoggingAppDelegate.m │ ├── MYLog.h │ ├── FineGrainedLogging-Info.plist │ ├── ReadMe.txt │ ├── TimerOne.m │ └── TimerTwo.m ├── SQLiteLogger │ ├── SQLiteLogger │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── Credits.rtf │ │ ├── SQLiteLogger-Prefix.pch │ │ ├── main.m │ │ ├── SQLiteLoggerAppDelegate.h │ │ ├── SQLiteLogger-Info.plist │ │ └── SQLiteLoggerAppDelegate.m │ ├── SQLiteLogger.xcodeproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── Podfile │ ├── FMDB │ │ └── FMDatabaseAdditions.h │ └── FMDBLogger.h ├── Benchmark │ ├── Desktop │ │ ├── BenchmarkMac │ │ │ ├── en.lproj │ │ │ │ ├── InfoPlist.strings │ │ │ │ └── Credits.rtf │ │ │ ├── BenchmarkMac-Prefix.pch │ │ │ ├── main.m │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ └── BenchmarkMac-Info.plist │ │ ├── ReadMe.txt │ │ └── Podfile │ └── Mobile │ │ ├── Default-568h@2x.png │ │ ├── Classes │ │ ├── BenchmarkIPhoneViewController.h │ │ ├── BenchmarkIPhoneAppDelegate.h │ │ ├── BenchmarkIPhoneAppDelegate.m │ │ └── BenchmarkIPhoneViewController.m │ │ ├── BenchmarkIPhone_Prefix.pch │ │ ├── ReadMe.txt │ │ ├── Podfile │ │ ├── main.m │ │ └── BenchmarkIPhone-Info.plist ├── CoreDataLogger │ ├── CoreDataLogger │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── Credits.rtf │ │ ├── Log.xcdatamodeld │ │ │ ├── CocoaBotLog.xcdatamodel │ │ │ │ ├── layout │ │ │ │ └── elements │ │ │ └── .xccurrentversion │ │ ├── LogEntry.m │ │ ├── CoreDataLogger-Prefix.pch │ │ ├── CoreDataLogger.xcdatamodeld │ │ │ └── .xccurrentversion │ │ ├── main.m │ │ ├── CoreDataLoggerAppDelegate.h │ │ ├── LogEntry.h │ │ ├── CoreDataLogger-Info.plist │ │ ├── CoreDataLogger.h │ │ └── CoreDataLoggerAppDelegate.m │ ├── CoreDataLogger.xcodeproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ └── Podfile ├── PerUserLogLevels │ ├── PerUserLogLevels │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── Credits.rtf │ │ ├── PerUserLogLevels-Prefix.pch │ │ ├── main.m │ │ ├── AppDelegate.h │ │ ├── PerUserLogLevels-Info.plist │ │ └── AppDelegate.m │ ├── Podfile │ └── Scripts │ │ └── LumberjackUser.bash ├── DispatchQueueLogger │ ├── DispatchQueueLogger │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── Credits.rtf │ │ ├── DispatchQueueLogger-Prefix.pch │ │ ├── main.m │ │ ├── AppDelegate.h │ │ └── DispatchQueueLogger-Info.plist │ └── Podfile ├── TestXcodeColors │ ├── Desktop │ │ ├── TestXcodeColors │ │ │ ├── en.lproj │ │ │ │ ├── InfoPlist.strings │ │ │ │ └── Credits.rtf │ │ │ ├── AppDelegate.h │ │ │ ├── TestXcodeColors-Prefix.pch │ │ │ ├── main.m │ │ │ └── TestXcodeColors-Info.plist │ │ └── Podfile │ └── Mobile │ │ ├── TextXcodeColors │ │ ├── en.lproj │ │ │ └── InfoPlist.strings │ │ ├── ViewController.m │ │ ├── ViewController.h │ │ ├── AppDelegate.h │ │ ├── main.m │ │ ├── TextXcodeColors-Prefix.pch │ │ └── TextXcodeColors-Info.plist │ │ ├── Default-568h@2x.png │ │ └── Podfile ├── RegisteredDynamicLogging │ ├── Desktop │ │ ├── RegisteredLoggingTest │ │ │ ├── en.lproj │ │ │ │ ├── InfoPlist.strings │ │ │ │ └── Credits.rtf │ │ │ ├── Lions.h │ │ │ ├── Tigers.h │ │ │ ├── RegisteredLoggingTest-Prefix.pch │ │ │ ├── main.m │ │ │ ├── RegisteredLoggingTestAppDelegate.h │ │ │ ├── Lions.m │ │ │ ├── Tigers.m │ │ │ ├── RegisteredLoggingTestAppDelegate.m │ │ │ └── RegisteredLoggingTest-Info.plist │ │ └── Podfile │ └── Mobile │ │ ├── RegisteredLoggingTest │ │ ├── en.lproj │ │ │ └── InfoPlist.strings │ │ ├── Lions.h │ │ ├── Tigers.h │ │ ├── RegisteredLoggingTestViewController.h │ │ ├── RegisteredLoggingTestViewController.m │ │ ├── main.m │ │ ├── RegisteredLoggingTestAppDelegate.h │ │ ├── RegisteredLoggingTest-Prefix.pch │ │ ├── Lions.m │ │ ├── Tigers.m │ │ ├── RegisteredLoggingTestAppDelegate.m │ │ └── RegisteredLoggingTest-Info.plist │ │ ├── Default-568h@2x.png │ │ └── Podfile ├── UniversalApp │ ├── Default-568h@2x.png │ ├── UniversalApp_Prefix.pch │ ├── Classes │ │ ├── UniversalAppViewController.h │ │ ├── UniversalAppAppDelegate.h │ │ └── UniversalAppViewController.m │ ├── Podfile │ ├── main.m │ └── UniversalApp-Info.plist ├── WebServerIPhone │ ├── Default-568h@2x.png │ ├── Classes │ │ ├── WebServerIPhoneViewController.m │ │ ├── MyHTTPConnection.h │ │ ├── WebServerIPhoneViewController.h │ │ ├── WebSocketLogger.h │ │ └── WebServerIPhoneAppDelegate.h │ ├── Vendor │ │ └── CocoaHTTPServer │ │ │ ├── Responses │ │ │ ├── HTTPErrorResponse.h │ │ │ ├── HTTPDataResponse.h │ │ │ ├── HTTPRedirectResponse.h │ │ │ ├── HTTPFileResponse.h │ │ │ ├── HTTPErrorResponse.m │ │ │ ├── HTTPRedirectResponse.m │ │ │ ├── HTTPDynamicFileResponse.h │ │ │ └── HTTPDataResponse.m │ │ │ ├── Categories │ │ │ ├── DDData.h │ │ │ ├── DDNumber.h │ │ │ ├── DDRange.h │ │ │ └── DDNumber.m │ │ │ ├── Mime │ │ │ ├── MultipartMessageHeaderField.h │ │ │ └── MultipartMessageHeader.h │ │ │ ├── HTTPAuthenticationRequest.h │ │ │ └── HTTPMessage.h │ ├── WebServerIPhone_Prefix.pch │ ├── Podfile │ ├── main.m │ ├── Web │ │ ├── index.html │ │ └── styles.css │ ├── WebServerIPhone-Info.plist │ └── ReadMe.txt └── CLI │ ├── CLI │ ├── CLI-Prefix.pch │ └── main.m │ └── Podfile ├── Framework ├── Desktop │ ├── FmwkTest │ │ ├── en.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── Credits.rtf │ │ ├── AppDelegate.h │ │ ├── FmwkTest-Prefix.pch │ │ ├── main.m │ │ ├── AppDelegate.m │ │ └── FmwkTest-Info.plist │ └── Lumberjack │ │ ├── en.lproj │ │ └── InfoPlist.strings │ │ ├── Lumberjack-Prefix.pch │ │ └── Lumberjack-Info.plist ├── Mobile │ ├── LibTest │ │ ├── en.lproj │ │ │ └── InfoPlist.strings │ │ ├── ViewController.m │ │ ├── ViewController.h │ │ ├── Formatter.h │ │ ├── AppDelegate.h │ │ ├── main.m │ │ ├── LibTest-Prefix.pch │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── LaunchImage.launchimage │ │ │ │ └── Contents.json │ │ ├── AppDelegate.m │ │ ├── Formatter.m │ │ ├── LibTest-Info.plist │ │ └── Base.lproj │ │ │ ├── Main_iPad.storyboard │ │ │ └── Main_iPhone.storyboard │ └── Lumberjack │ │ └── Lumberjack-Prefix.pch └── Lumberjack.xcworkspace │ └── contents.xcworkspacedata ├── Benchmarking ├── Results │ ├── Lumberjack Benchmark (iMac).ograph │ ├── Lumberjack Benchmark (iPad).ograph │ ├── Lumberjack Benchmark (PowerMac).ograph │ ├── Lumberjack Benchmark (iPhone 3GS).ograph │ ├── Benchmark iMac.csv │ ├── Benchmark iPad.csv │ ├── Benchmark PowerMac.csv │ ├── Benchmark iPhone 3GS.csv │ └── Benchmark iPodTouch3 GCD.csv ├── BaseNSLogging.h ├── StaticLogging.h ├── DynamicLogging.h ├── PerformanceTesting.h ├── BaseNSLogging.m └── StaticLogging.m ├── Documentation ├── AppCode-support.md ├── PerLoggerLogLevels.md ├── ProblemSolution.md ├── FAQ.md └── README.md ├── .gitignore ├── Classes ├── CLI │ ├── CLIColor.h │ └── CLIColor.m ├── DDASLLogCapture.h ├── Extensions │ └── DDMultiFormatter.h ├── DDAssertMacros.h ├── DDLogMacros.h └── DDASLLogger.h ├── LICENSE.txt └── CocoaLumberjack.podspec /.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | 3 | Xcode/*/build 4 | *.pbxuser 5 | *.mode1v3 6 | *.xcuserdatad 7 | -------------------------------------------------------------------------------- /LumberjackLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonasschnelli/CocoaLumberjack/master/LumberjackLogo.png -------------------------------------------------------------------------------- /Demos/CaptureASL/CaptureASL/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/ContextFilter/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/CustomFormatters/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/CustomLogLevels/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/GlobalLogLevel/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/LogFileCompressor/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/NonArcTest/NonArcTest/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/OverflowTestMac/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/RollingTestMac/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Framework/Desktop/FmwkTest/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Framework/Desktop/Lumberjack/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/CaptureASL/CaptureASLTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/FineGrainedLogging/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/GlobalLogLevel/MyLogging.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | extern int ddLogLevel; 4 | -------------------------------------------------------------------------------- /Demos/SQLiteLogger/SQLiteLogger/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/Benchmark/Desktop/BenchmarkMac/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/PerUserLogLevels/PerUserLogLevels/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/DispatchQueueLogger/DispatchQueueLogger/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Desktop/TestXcodeColors/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Mobile/TextXcodeColors/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/ViewController.m: -------------------------------------------------------------------------------- 1 | #import "ViewController.h" 2 | 3 | 4 | @implementation ViewController 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Desktop/RegisteredLoggingTest/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/RegisteredLoggingTest/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demos/UniversalApp/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonasschnelli/CocoaLumberjack/master/Demos/UniversalApp/Default-568h@2x.png -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/ViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface ViewController : UIViewController 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Demos/Benchmark/Mobile/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonasschnelli/CocoaLumberjack/master/Demos/Benchmark/Mobile/Default-568h@2x.png -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonasschnelli/CocoaLumberjack/master/Demos/WebServerIPhone/Default-568h@2x.png -------------------------------------------------------------------------------- /Demos/GlobalLogLevel/Stuff.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface Stuff : NSObject { 5 | 6 | } 7 | 8 | + (void)doStuff; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Mobile/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonasschnelli/CocoaLumberjack/master/Demos/TestXcodeColors/Mobile/Default-568h@2x.png -------------------------------------------------------------------------------- /Demos/RollingTestMac/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This Xcode project tests the file logger by ensuring that it is properly rolling log files when it should. It is a unit test project. -------------------------------------------------------------------------------- /Benchmarking/Results/Lumberjack Benchmark (iMac).ograph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonasschnelli/CocoaLumberjack/master/Benchmarking/Results/Lumberjack Benchmark (iMac).ograph -------------------------------------------------------------------------------- /Benchmarking/Results/Lumberjack Benchmark (iPad).ograph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonasschnelli/CocoaLumberjack/master/Benchmarking/Results/Lumberjack Benchmark (iPad).ograph -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonasschnelli/CocoaLumberjack/master/Demos/RegisteredDynamicLogging/Mobile/Default-568h@2x.png -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Mobile/TextXcodeColors/ViewController.m: -------------------------------------------------------------------------------- 1 | #import "ViewController.h" 2 | 3 | 4 | @implementation ViewController 5 | 6 | @synthesize label; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Benchmarking/Results/Lumberjack Benchmark (PowerMac).ograph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonasschnelli/CocoaLumberjack/master/Benchmarking/Results/Lumberjack Benchmark (PowerMac).ograph -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/RegisteredLoggingTest/Lions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface Lions : NSObject 5 | 6 | + (void)logStuff; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Classes/WebServerIPhoneViewController.m: -------------------------------------------------------------------------------- 1 | #import "WebServerIPhoneViewController.h" 2 | 3 | 4 | @implementation WebServerIPhoneViewController 5 | 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/Formatter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface Formatter : DDDispatchQueueLogFormatter 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Benchmarking/Results/Lumberjack Benchmark (iPhone 3GS).ograph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonasschnelli/CocoaLumberjack/master/Benchmarking/Results/Lumberjack Benchmark (iPhone 3GS).ograph -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Desktop/RegisteredLoggingTest/Lions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface Lions : NSObject 5 | 6 | + (void)logStuff; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Desktop/RegisteredLoggingTest/Tigers.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface Tigers : NSObject 5 | 6 | + (void)logStuff; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/RegisteredLoggingTest/Tigers.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface Tigers : NSObject 5 | 6 | + (void)logStuff; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Classes/MyHTTPConnection.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "HTTPConnection.h" 3 | 4 | 5 | @interface MyHTTPConnection : HTTPConnection 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Demos/FineGrainedLogging/TimerOne.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface TimerOne : NSObject 5 | { 6 | NSTimer *foodTimer; 7 | NSTimer *sleepTimer; 8 | } 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Demos/FineGrainedLogging/TimerTwo.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface TimerTwo : NSObject 5 | { 6 | NSTimer *foodTimer; 7 | NSTimer *sleepTimer; 8 | } 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Demos/CustomFormatters/TestFormatter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | 5 | @interface TestFormatter : NSObject 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Demos/OverflowTestMac/SlowLogger.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | 5 | @interface SlowLogger : DDAbstractLogger 6 | 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Classes/WebServerIPhoneViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface WebServerIPhoneViewController : UIViewController { 5 | 6 | } 7 | 8 | @end 9 | 10 | -------------------------------------------------------------------------------- /Demos/ContextFilter/MyContextFilter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface MyContextFilter : NSObject 5 | { 6 | } 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Framework/Desktop/FmwkTest/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface AppDelegate : NSObject 5 | 6 | @property (assign) IBOutlet NSWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Demos/Benchmark/Mobile/Classes/BenchmarkIPhoneViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface BenchmarkIPhoneViewController : UIViewController 5 | { 6 | 7 | } 8 | 9 | @end 10 | 11 | -------------------------------------------------------------------------------- /Framework/Desktop/FmwkTest/FmwkTest-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'FmwkTest' target in the 'FmwkTest' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/RegisteredLoggingTest/RegisteredLoggingTestViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface RegisteredLoggingTestViewController : UIViewController 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Demos/ContextFilter/ThirdPartyFramework.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define TP_LOG_CONTEXT 1044 4 | 5 | 6 | @interface ThirdPartyFramework : NSObject 7 | 8 | + (void)start; 9 | 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Demos/NonArcTest/NonArcTest/NonArcTest-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'NonArcTest' target in the 'NonArcTest' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Desktop/TestXcodeColors/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface AppDelegate : NSObject 5 | 6 | @property (assign) IBOutlet NSWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Demos/ContextFilter/ContextFilter_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ContextFilter' target in the 'ContextFilter' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/Log.xcdatamodeld/CocoaBotLog.xcdatamodel/layout: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonasschnelli/CocoaLumberjack/master/Demos/CoreDataLogger/CoreDataLogger/Log.xcdatamodeld/CocoaBotLog.xcdatamodel/layout -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/LogEntry.m: -------------------------------------------------------------------------------- 1 | #import "LogEntry.h" 2 | 3 | 4 | @implementation LogEntry 5 | 6 | @dynamic context; 7 | @dynamic level; 8 | @dynamic message; 9 | @dynamic timestamp; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Demos/GlobalLogLevel/GlobalLogLevel_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'GlobalLogLevel' target in the 'GlobalLogLevel' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/RegisteredLoggingTest/RegisteredLoggingTestViewController.m: -------------------------------------------------------------------------------- 1 | #import "RegisteredLoggingTestViewController.h" 2 | 3 | 4 | @implementation RegisteredLoggingTestViewController 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Demos/RollingTestMac/RollingTestMac_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'RollingTestMac' target in the 'RollingTestMac' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/Log.xcdatamodeld/CocoaBotLog.xcdatamodel/elements: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jonasschnelli/CocoaLumberjack/master/Demos/CoreDataLogger/CoreDataLogger/Log.xcdatamodeld/CocoaBotLog.xcdatamodel/elements -------------------------------------------------------------------------------- /Demos/CustomLogLevels/CustomLogLevels_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'CustomLogLevels' target in the 'CustomLogLevels' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/OverflowTestMac/OverflowTestMac_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OverflowTestMac' target in the 'OverflowTestMac' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/SQLiteLogger/SQLiteLogger/SQLiteLogger-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SQLiteLogger' target in the 'SQLiteLogger' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Framework/Desktop/Lumberjack/Lumberjack-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Lumberjack' target in the 'Lumberjack' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/Benchmark/Desktop/BenchmarkMac/BenchmarkMac-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'BenchmarkMac' target in the 'BenchmarkMac' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/CustomFormatters/CustomFormatters_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'CustomFormatters' target in the 'CustomFormatters' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/OverflowTestMac/SlowLogger.m: -------------------------------------------------------------------------------- 1 | #import "SlowLogger.h" 2 | 3 | 4 | @implementation SlowLogger 5 | 6 | - (void)logMessage:(DDLogMessage *)logMessage 7 | { 8 | [NSThread sleepForTimeInterval:0.25]; 9 | } 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/CoreDataLogger-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'CoreDataLogger' target in the 'CoreDataLogger' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/LogFileCompressor/LogFileCompressor_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'LogFileCompressor' target in the 'LogFileCompressor' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/FineGrainedLogging/FineGrainedLogging_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'FineGrainedLogging' target in the 'FineGrainedLogging' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/CLI/CLI/CLI-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | -------------------------------------------------------------------------------- /Demos/PerUserLogLevels/PerUserLogLevels/PerUserLogLevels-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'PerUserLogLevels' target in the 'PerUserLogLevels' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Desktop/TestXcodeColors/TestXcodeColors-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'TestXcodeColors' target in the 'TestXcodeColors' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Framework/Mobile/Lumberjack/Lumberjack-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | @import Foundation; 9 | #endif 10 | -------------------------------------------------------------------------------- /Benchmarking/BaseNSLogging.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface BaseNSLogging : NSObject 5 | 6 | + (void)speedTest0; 7 | + (void)speedTest1; 8 | + (void)speedTest2; 9 | + (void)speedTest3; 10 | + (void)speedTest4; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Benchmarking/StaticLogging.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface StaticLogging : NSObject 5 | 6 | + (void)speedTest0; 7 | + (void)speedTest1; 8 | + (void)speedTest2; 9 | + (void)speedTest3; 10 | + (void)speedTest4; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Demos/UniversalApp/UniversalApp_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'UniversalApp' target in the 'UniversalApp' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Benchmarking/DynamicLogging.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface DynamicLogging : NSObject 5 | 6 | + (void)speedTest0; 7 | + (void)speedTest1; 8 | + (void)speedTest2; 9 | + (void)speedTest3; 10 | + (void)speedTest4; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Demos/DispatchQueueLogger/DispatchQueueLogger/DispatchQueueLogger-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'DispatchQueueLogger' target in the 'DispatchQueueLogger' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/SQLiteLogger/SQLiteLogger.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Mobile/TextXcodeColors/ViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ViewController : UIViewController 4 | { 5 | IBOutlet UILabel *label; 6 | } 7 | 8 | @property (nonatomic, readonly) UILabel *label; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demos/GlobalLogLevel/GlobalLogLevel.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demos/Benchmark/Desktop/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This Xcode project provides a benchmarking suite for performance testing on Mac OS X. 2 | 3 | Details of the tests, as well as sample results, are provided on the Wiki: 4 | https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/Performance 5 | -------------------------------------------------------------------------------- /Demos/Benchmark/Mobile/BenchmarkIPhone_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'BenchmarkIPhone' target in the 'BenchmarkIPhone' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Demos/Benchmark/Mobile/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This Xcode project provides a benchmarking suite for performance testing on the iPhone. 2 | 3 | Details of the tests, as well as sample results, are provided on the Wiki: 4 | https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/Performance 5 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/CoreDataLogger.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Responses/HTTPErrorResponse.h: -------------------------------------------------------------------------------- 1 | #import "HTTPResponse.h" 2 | 3 | @interface HTTPErrorResponse : NSObject { 4 | NSInteger _status; 5 | } 6 | 7 | - (id)initWithErrorCode:(int)httpErrorCode; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/WebServerIPhone_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'WebServerIPhone' target in the 'WebServerIPhone' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Desktop/RegisteredLoggingTest/RegisteredLoggingTest-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'RegisteredLoggingTest' target in the 'RegisteredLoggingTest' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Demos/CustomLogLevels/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CustomLogLevels 4 | // 5 | // Created by Robbie Hanson on 5/13/10. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | return NSApplicationMain(argc, (const char **) argv); 13 | } 14 | -------------------------------------------------------------------------------- /Demos/NonArcTest/NonArcTest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // NonArcTest 4 | // 5 | // Created by Robbie Hanson on 11/9/11. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | return NSApplicationMain(argc, (const char **)argv); 13 | } 14 | -------------------------------------------------------------------------------- /Demos/OverflowTestMac/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OverflowTestMac 4 | // 5 | // Created by Robbie Hanson on 5/10/10. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | return NSApplicationMain(argc, (const char **) argv); 13 | } 14 | -------------------------------------------------------------------------------- /Demos/RollingTestMac/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RollingTestMac 4 | // 5 | // Created by Robbie Hanson on 5/6/10. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | return NSApplicationMain(argc, (const char **) argv); 13 | } 14 | -------------------------------------------------------------------------------- /Demos/CustomFormatters/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CustomFormatters 4 | // 5 | // Created by Robbie Hanson on 5/13/10. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | return NSApplicationMain(argc, (const char **) argv); 13 | } 14 | -------------------------------------------------------------------------------- /Demos/FineGrainedLogging/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // FineGrainedLogging 4 | // 5 | // Created by Robbie Hanson on 5/14/10. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | return NSApplicationMain(argc, (const char **) argv); 13 | } 14 | -------------------------------------------------------------------------------- /Demos/LogFileCompressor/CompressingLogFileManager.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | 5 | @interface CompressingLogFileManager : DDLogFileManagerDefault 6 | { 7 | BOOL upToDate; 8 | BOOL isCompressing; 9 | } 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Demos/LogFileCompressor/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // LogFileCompressor 4 | // 5 | // Created by Robbie Hanson on 5/25/10. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | return NSApplicationMain(argc, (const char **) argv); 13 | } 14 | -------------------------------------------------------------------------------- /Demos/Benchmark/Desktop/BenchmarkMac/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BenchmarkMac 4 | // 5 | // Created by Robbie Hanson on 11/15/11. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | return NSApplicationMain(argc, (const char **)argv); 13 | } 14 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CoreDataLogger 4 | // 5 | // Created by Robbie Hanson on 3/30/11. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | return NSApplicationMain(argc, (const char **)argv); 13 | } 14 | -------------------------------------------------------------------------------- /Demos/CustomFormatters/CustomFormattersAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface CustomFormattersAppDelegate : NSObject { 5 | NSWindow *__unsafe_unretained window; 6 | } 7 | 8 | @property (unsafe_unretained) IBOutlet NSWindow *window; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Demos/CustomLogLevels/CustomLogLevelsAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface CustomLogLevelsAppDelegate : NSObject { 5 | NSWindow *__unsafe_unretained window; 6 | } 7 | 8 | @property (unsafe_unretained) IBOutlet NSWindow *window; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Demos/PerUserLogLevels/PerUserLogLevels/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // PerUserLogLevels 4 | // 5 | // Created by Robbie Hanson on 3/30/12. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | return NSApplicationMain(argc, (const char **)argv); 13 | } 14 | -------------------------------------------------------------------------------- /Demos/DispatchQueueLogger/DispatchQueueLogger/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DispatchQueueLogger 4 | // 5 | // Created by Robbie Hanson on 11/8/11. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | return NSApplicationMain(argc, (const char **)argv); 13 | } 14 | -------------------------------------------------------------------------------- /Demos/LogFileCompressor/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This Xcode project demonstrates compressing archived log files. This is done by creating a custom DDLogFileManager, which is part of the DDFileLogger. 2 | 3 | For more information, see the Wiki article: 4 | https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/LogFileManagement 5 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Desktop/TestXcodeColors/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TestXcodeColors 4 | // 5 | // Created by Robbie Hanson on 5/17/12. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | return NSApplicationMain(argc, (const char **)argv); 13 | } 14 | -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class ViewController; 4 | 5 | 6 | @interface AppDelegate : UIResponder 7 | 8 | @property (strong, nonatomic) UIWindow *window; 9 | @property (strong, nonatomic) ViewController *viewController; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Demos/CLI/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'CLI' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack/CLI', :path => '../../' 8 | end 9 | 10 | target :CLI_osx do 11 | platform :osx, '10.7' 12 | link_with 'CLI' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/UniversalApp/Classes/UniversalAppViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UniversalAppViewController.h 3 | // UniversalApp 4 | // 5 | // Created by Robbie Hanson on 7/1/10. 6 | // 7 | 8 | #import 9 | 10 | @interface UniversalAppViewController : UIViewController { 11 | 12 | } 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Demos/NonArcTest/NonArcTest/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // NonArcTest 4 | // 5 | // Created by Robbie Hanson on 11/9/11. 6 | // 7 | 8 | #import 9 | 10 | @interface AppDelegate : NSObject 11 | 12 | @property (assign) IBOutlet NSWindow *window; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Desktop/RegisteredLoggingTest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RegisteredLoggingTest 4 | // 5 | // Created by Robbie Hanson on 9/5/11. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | return NSApplicationMain(argc, (const char **)argv); 13 | } 14 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Mobile/TextXcodeColors/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class ViewController; 4 | 5 | 6 | @interface AppDelegate : UIResponder 7 | 8 | @property (strong, nonatomic) UIWindow *window; 9 | @property (strong, nonatomic) ViewController *viewController; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Categories/DDData.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSData (DDData) 4 | 5 | - (NSData *)md5Digest; 6 | 7 | - (NSData *)sha1Digest; 8 | 9 | - (NSString *)hexStringValue; 10 | 11 | - (NSString *)base64Encoded; 12 | - (NSData *)base64Decoded; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Responses/HTTPDataResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "HTTPResponse.h" 3 | 4 | 5 | @interface HTTPDataResponse : NSObject 6 | { 7 | NSUInteger offset; 8 | NSData *data; 9 | } 10 | 11 | - (id)initWithData:(NSData *)data; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Responses/HTTPRedirectResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "HTTPResponse.h" 3 | 4 | 5 | @interface HTTPRedirectResponse : NSObject 6 | { 7 | NSString *redirectPath; 8 | } 9 | 10 | - (id)initWithPath:(NSString *)redirectPath; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Demos/Benchmark/Desktop/BenchmarkMac/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // BenchmarkMac 4 | // 5 | // Created by Robbie Hanson on 11/15/11. 6 | // 7 | 8 | #import 9 | 10 | @interface AppDelegate : NSObject 11 | 12 | @property (assign) IBOutlet NSWindow *window; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Demos/CaptureASL/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'CaptureASL' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :CASL_ios do 11 | platform :ios, '5.0' 12 | link_with 'CaptureASL' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/ContextFilter/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ContextFilter 4 | // 5 | // Created by Robbie Hanson on 11/22/10. 6 | // Copyright 2010 Voalte. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char **) argv); 14 | } 15 | -------------------------------------------------------------------------------- /Demos/GlobalLogLevel/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // GlobalLogLevel 4 | // 5 | // Created by Robbie Hanson on 2/28/11. 6 | // Copyright 2011 Voalte. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char **) argv); 14 | } 15 | -------------------------------------------------------------------------------- /Demos/NonArcTest/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'NonArcTest' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :NAT_osx do 11 | platform :osx, '10.7' 12 | link_with 'NonArcTest' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/PerUserLogLevels/PerUserLogLevels/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // PerUserLogLevels 4 | // 5 | // Created by Robbie Hanson on 3/30/12. 6 | // 7 | 8 | #import 9 | 10 | @interface AppDelegate : NSObject 11 | 12 | @property (assign) IBOutlet NSWindow *window; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Demos/SQLiteLogger/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'SQLiteLogger' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :SQLL_osx do 11 | platform :osx, '10.7' 12 | link_with 'SQLiteLogger' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/UniversalApp/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'UniversalApp' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :UA_ios do 11 | platform :ios, '5.0' 12 | link_with 'UniversalApp' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/CaptureASL/CaptureASL/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CaptureASL 4 | // 5 | // Created by Ernesto Rivera on 2014/03/20. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /Demos/ContextFilter/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'ContextFilter' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :CFi_osx do 11 | platform :osx, '10.7' 12 | link_with 'ContextFilter' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'CoreDataLogger' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :CDL_osx do 11 | platform :osx, '10.7' 12 | link_with 'CoreDataLogger' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/GlobalLogLevel/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'GlobalLogLevel' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :GLL_osx do 11 | platform :osx, '10.7' 12 | link_with 'GlobalLogLevel' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/RollingTestMac/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'RollingTestMac' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :RTM_osx do 11 | platform :osx, '10.7' 12 | link_with 'RollingTestMac' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/SQLiteLogger/SQLiteLogger/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SQLiteLogger 4 | // 5 | // Created by Robbie Hanson on 3/29/11. 6 | // Copyright 2011 Voalte. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char **)argv); 14 | } 15 | -------------------------------------------------------------------------------- /Demos/Benchmark/Desktop/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'BenchmarkMac' 4 | workspace '../../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../../' 8 | end 9 | 10 | target :BM_osx do 11 | platform :osx, '10.7' 12 | link_with 'BenchmarkMac' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/CustomFormatters/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'CustomFormatters' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :CFo_osx do 11 | platform :osx, '10.7' 12 | link_with 'CustomFormatters' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/CustomLogLevels/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'CustomLogLevels' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :CLL_osx do 11 | platform :osx, '10.7' 12 | link_with 'CustomLogLevels' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/GlobalLogLevel/Stuff.m: -------------------------------------------------------------------------------- 1 | #import "Stuff.h" 2 | #import "MyLogging.h" 3 | 4 | 5 | @implementation Stuff 6 | 7 | + (void)doStuff 8 | { 9 | DDLogError(@"%@: Error", THIS_FILE); 10 | DDLogWarn(@"%@: Warn", THIS_FILE); 11 | DDLogInfo(@"%@: Info", THIS_FILE); 12 | DDLogVerbose(@"%@: Verbose", THIS_FILE); 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Demos/OverflowTestMac/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'OverflowTestMac' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :OTM_osx do 11 | platform :osx, '10.7' 12 | link_with 'OverflowTestMac' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Desktop/RegisteredLoggingTest/RegisteredLoggingTestAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface RegisteredLoggingTestAppDelegate : NSObject { 5 | NSWindow *__unsafe_unretained window; 6 | } 7 | 8 | @property (unsafe_unretained) IBOutlet NSWindow *window; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'WebServerIPhone' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :WSIP_ios do 11 | platform :ios, '5.0' 12 | link_with 'WebServerIPhone' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Framework/Desktop/FmwkTest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // FmwkTest 4 | // 5 | // Created by Robbie Hanson on 2/16/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char **)argv); 14 | } 15 | -------------------------------------------------------------------------------- /Demos/Benchmark/Desktop/BenchmarkMac/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import "PerformanceTesting.h" 3 | 4 | 5 | @implementation AppDelegate 6 | 7 | @synthesize window = _window; 8 | 9 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 10 | { 11 | [PerformanceTesting startPerformanceTests]; 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Demos/Benchmark/Mobile/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'BenchmarkIPhone' 4 | workspace '../../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../../' 8 | end 9 | 10 | target :BIP_ios do 11 | platform :ios, '5.0' 12 | link_with 'BenchmarkIPhone' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/CaptureASL/CaptureASL/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // CaptureASL 4 | // 5 | // Created by Ernesto Rivera on 2014/03/20. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | - (IBAction)log:(id)sender; 14 | - (IBAction)asl_log:(UIButton *)sender; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/Log.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | CocoaBotLog.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demos/LogFileCompressor/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'LogFileCompressor' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :LFC_osx do 11 | platform :osx, '10.7' 12 | link_with 'LogFileCompressor' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/PerUserLogLevels/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'PerUserLogLevels' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :PULL_osx do 11 | platform :osx, '10.7' 12 | link_with 'PerUserLogLevels' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/UniversalApp/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // UniversalApp 4 | // 5 | // Created by Robbie Hanson on 7/1/10. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) { 11 | 12 | @autoreleasepool { 13 | int retVal = UIApplicationMain(argc, argv, nil, nil); 14 | return retVal; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Demos/Benchmark/Mobile/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BenchmarkIPhone 4 | // 5 | // Created by Robbie Hanson on 5/6/10. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) { 11 | 12 | @autoreleasepool { 13 | int retVal = UIApplicationMain(argc, argv, nil, nil); 14 | return retVal; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Demos/DispatchQueueLogger/DispatchQueueLogger/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DispatchQueueLogger 4 | // 5 | // Created by Robbie Hanson on 11/8/11. 6 | // 7 | 8 | #import 9 | 10 | @interface AppDelegate : NSObject 11 | 12 | @property (unsafe_unretained) IBOutlet NSWindow *window; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Demos/DispatchQueueLogger/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'DispatchQueueLogger' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :DQL_osx do 11 | platform :osx, '10.7' 12 | link_with 'DispatchQueueLogger' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/FineGrainedLogging/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'FineGrainedLogging' 4 | workspace '../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../' 8 | end 9 | 10 | target :FGL_osx do 11 | platform :osx, '10.7' 12 | link_with 'FineGrainedLogging' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Mobile/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'TextXcodeColors' 4 | workspace '../../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../../' 8 | end 9 | 10 | target :TXC_ios do 11 | platform :ios, '5.0' 12 | link_with 'TextXcodeColors' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // WebServerIPhone 4 | // 5 | // Created by Robbie Hanson on 5/6/10. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) { 11 | 12 | @autoreleasepool { 13 | int retVal = UIApplicationMain(argc, argv, nil, nil); 14 | return retVal; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Desktop/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'TestXcodeColors' 4 | workspace '../../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../../' 8 | end 9 | 10 | target :TXC_osx do 11 | platform :osx, '10.7' 12 | link_with 'TestXcodeColors' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'RegisteredLoggingTest' 4 | workspace '../../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../../' 8 | end 9 | 10 | target :RLT_ios do 11 | platform :ios, '5.0' 12 | link_with 'RegisteredLoggingTest' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/RollingTestMac/RollingTestMacAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class DDFileLogger; 4 | 5 | 6 | @interface RollingTestMacAppDelegate : NSObject 7 | { 8 | DDFileLogger *fileLogger; 9 | 10 | NSWindow *__unsafe_unretained window; 11 | } 12 | 13 | @property (unsafe_unretained) IBOutlet NSWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Demos/SQLiteLogger/SQLiteLogger/SQLiteLoggerAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class FMDBLogger; 4 | 5 | 6 | @interface SQLiteLoggerAppDelegate : NSObject { 7 | @private 8 | FMDBLogger *sqliteLogger; 9 | NSWindow *__unsafe_unretained window; 10 | } 11 | 12 | @property (unsafe_unretained) IBOutlet NSWindow *window; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Demos/LogFileCompressor/LogFileCompressorAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class DDFileLogger; 4 | 5 | 6 | @interface LogFileCompressorAppDelegate : NSObject 7 | { 8 | DDFileLogger *fileLogger; 9 | 10 | NSWindow *__unsafe_unretained window; 11 | } 12 | 13 | @property (unsafe_unretained) IBOutlet NSWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Desktop/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | xcodeproj 'RegisteredLoggingTest' 4 | workspace '../../Demos' 5 | 6 | def import_pods 7 | pod 'CocoaLumberjack', :path => '../../../' 8 | end 9 | 10 | target :RLT_osx do 11 | platform :osx, '10.7' 12 | link_with 'RegisteredLoggingTest' 13 | import_pods 14 | end 15 | 16 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/CoreDataLoggerAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CoreDataLogger; 4 | 5 | 6 | @interface CoreDataLoggerAppDelegate : NSObject { 7 | @private 8 | CoreDataLogger *coreDataLogger; 9 | NSWindow *__unsafe_unretained window; 10 | } 11 | 12 | @property (unsafe_unretained) IBOutlet NSWindow *window; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/RegisteredLoggingTest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RegisteredLoggingTest 4 | // 5 | // Created by Robbie Hanson on 9/5/11. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | int retVal = UIApplicationMain(argc, argv, nil, nil); 14 | return retVal; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Lumberjack Logging Framework 4 | 5 | 6 | 7 |

Lumberjack Logging Framework

8 | 12 | 13 | -------------------------------------------------------------------------------- /Demos/CaptureASL/CaptureASL/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CaptureASL 4 | // 5 | // Created by Ernesto Rivera on 2014/03/20. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/LogEntry.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | 5 | @interface LogEntry : NSManagedObject 6 | 7 | @property (nonatomic, strong) NSNumber * context; 8 | @property (nonatomic, strong) NSNumber * level; 9 | @property (nonatomic, strong) NSString * message; 10 | @property (nonatomic, strong) NSDate * timestamp; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Demos/CustomFormatters/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This Xcode project provides a sample custom formatter. It shows how one can customize the output format of a log message. This particular example demonstrates prefixing the file name, function, and line number before a log message. 2 | 3 | For more information on custom formatters, see the Wiki article: 4 | https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomFormatters 5 | -------------------------------------------------------------------------------- /Demos/CustomLogLevels/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This Xcode project demonstrates how you can customize the number of log levels, as well as the log level names. This particular project demonstrates using the following levels: 2 | 3 | Fatal 4 | Error 5 | Warn 6 | Notice 7 | Info 8 | Debug 9 | 10 | For more information, see the Wiki article: 11 | https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomLogLevels 12 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Mobile/TextXcodeColors/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TextXcodeColors 4 | // 5 | // Created by Robbie Hanson on 5/24/12. 6 | // 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char *argv[]) 13 | { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Demos/FineGrainedLogging/FineGrainedLoggingAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class TimerOne; 4 | @class TimerTwo; 5 | 6 | 7 | @interface FineGrainedLoggingAppDelegate : NSObject 8 | { 9 | TimerOne *timerOne; 10 | TimerTwo *timerTwo; 11 | 12 | NSWindow *__unsafe_unretained window; 13 | } 14 | 15 | @property (unsafe_unretained) IBOutlet NSWindow *window; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Demos/OverflowTestMac/OverflowTestMacAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // OverflowTestMacAppDelegate.h 3 | // OverflowTestMac 4 | // 5 | // Created by Robbie Hanson on 5/10/10. 6 | // 7 | 8 | #import 9 | 10 | @interface OverflowTestMacAppDelegate : NSObject { 11 | NSWindow *__unsafe_unretained window; 12 | } 13 | 14 | @property (unsafe_unretained) IBOutlet NSWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/RegisteredLoggingTest/RegisteredLoggingTestAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class RegisteredLoggingTestViewController; 4 | 5 | 6 | @interface RegisteredLoggingTestAppDelegate : NSObject 7 | 8 | @property (nonatomic, strong) IBOutlet UIWindow *window; 9 | @property (nonatomic, strong) IBOutlet RegisteredLoggingTestViewController *viewController; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Categories/DDNumber.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface NSNumber (DDNumber) 5 | 6 | + (BOOL)parseString:(NSString *)str intoSInt64:(SInt64 *)pNum; 7 | + (BOOL)parseString:(NSString *)str intoUInt64:(UInt64 *)pNum; 8 | 9 | + (BOOL)parseString:(NSString *)str intoNSInteger:(NSInteger *)pNum; 10 | + (BOOL)parseString:(NSString *)str intoNSUInteger:(NSUInteger *)pNum; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // LibTest 4 | // 5 | // Created by Robbie Hanson on 2/3/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Mobile/TextXcodeColors/TextXcodeColors-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'TextXcodeColors' target in the 'TextXcodeColors' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /Demos/CaptureASL/CaptureASL/CaptureASL-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Demos/ContextFilter/ContextFilterAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ContextFilterAppDelegate.h 3 | // ContextFilter 4 | // 5 | // Created by Robbie Hanson on 11/22/10. 6 | // Copyright 2010 Voalte. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ContextFilterAppDelegate : NSObject { 12 | NSWindow *__unsafe_unretained window; 13 | } 14 | 15 | @property (unsafe_unretained) IBOutlet NSWindow *window; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Demos/GlobalLogLevel/GlobalLogLevelAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GlobalLogLevelAppDelegate.h 3 | // GlobalLogLevel 4 | // 5 | // Created by Robbie Hanson on 2/28/11. 6 | // Copyright 2011 Voalte. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GlobalLogLevelAppDelegate : NSObject { 12 | NSWindow *__unsafe_unretained window; 13 | } 14 | 15 | @property (unsafe_unretained) IBOutlet NSWindow *window; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Demos/Benchmark/Mobile/Classes/BenchmarkIPhoneAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class BenchmarkIPhoneViewController; 4 | 5 | 6 | @interface BenchmarkIPhoneAppDelegate : NSObject 7 | { 8 | UIWindow *window; 9 | BenchmarkIPhoneViewController *viewController; 10 | } 11 | 12 | @property (nonatomic, strong) IBOutlet UIWindow *window; 13 | @property (nonatomic, strong) IBOutlet BenchmarkIPhoneViewController *viewController; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/RegisteredLoggingTest/RegisteredLoggingTest-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'RegisteredLoggingTest' target in the 'RegisteredLoggingTest' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /Demos/CaptureASL/CaptureASL/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Documentation/AppCode-support.md: -------------------------------------------------------------------------------- 1 | CocoaLumberjack works by default in AppCode, but colours are not supported out of the box. To enable colours: 2 | 3 | 1. Install the 'Grep Console' plugin (http://plugins.jetbrains.com/plugin/7125) 4 | 2. Enable ANSI colouring (Settings > Grep Console) 5 | 3. Go to Run > Edit configurations... 6 | 4. Add TERM=color to the 'Environment variables' (edit them by clicking on the ellipsis) 7 | 5. `[[DDTTYLogger sharedInstance] setColorsEnabled:YES];` 8 | 9 | Kudos to @davidlawson for this documentation. -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/LibTest-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'LibTest' target in the 'LibTest' project 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Demos/OverflowTestMac/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This Xcode project demonstrates how the logging framework handles overflow. That is, if asynchronous logging is enabled, and the application spits out log messages faster than the framework can process them, then what should the framework do? 2 | 3 | The framework can optionally enforce a maximum queue size. This project tests this max queue size, and ensures the framework is properly enforcing it. 4 | 5 | Detailed information can be found in DDLog's queueLogMessage:: method. 6 | 7 | This is a unit test project. -------------------------------------------------------------------------------- /Demos/CustomFormatters/TestFormatter.m: -------------------------------------------------------------------------------- 1 | #import "TestFormatter.h" 2 | 3 | 4 | /** 5 | * For more information about creating custom formatters, see the wiki article: 6 | * https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomFormatters 7 | **/ 8 | @implementation TestFormatter 9 | 10 | - (NSString *)formatLogMessage:(DDLogMessage *)logMessage 11 | { 12 | return [NSString stringWithFormat:@"%@ | %s @ %i | %@", 13 | [logMessage fileName], logMessage->function, logMessage->lineNumber, logMessage->logMsg]; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Demos/Benchmark/Mobile/Classes/BenchmarkIPhoneAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "BenchmarkIPhoneAppDelegate.h" 2 | #import "BenchmarkIPhoneViewController.h" 3 | #import "PerformanceTesting.h" 4 | 5 | 6 | @implementation BenchmarkIPhoneAppDelegate 7 | 8 | @synthesize window; 9 | @synthesize viewController; 10 | 11 | 12 | - (void)applicationDidFinishLaunching:(UIApplication *)application 13 | { 14 | [window addSubview:viewController.view]; 15 | [window makeKeyAndVisible]; 16 | 17 | [PerformanceTesting startPerformanceTests]; 18 | } 19 | 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Classes/WebSocketLogger.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "WebSocket.h" 4 | 5 | 6 | #define WebSocketLoggerDidDieNotification @"WebSocketLoggerDidDie" 7 | 8 | @interface WebSocketLogger : DDAbstractLogger 9 | { 10 | WebSocket *websocket; 11 | BOOL isWebSocketOpen; 12 | } 13 | 14 | - (id)initWithWebSocket:(WebSocket *)ws; 15 | 16 | @end 17 | 18 | @interface WebSocketFormatter : NSObject 19 | { 20 | NSDateFormatter *dateFormatter; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Demos/UniversalApp/Classes/UniversalAppAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // UniversalAppAppDelegate.h 3 | // UniversalApp 4 | // 5 | // Created by Robbie Hanson on 7/1/10. 6 | // 7 | 8 | #import 9 | 10 | @class UniversalAppViewController; 11 | 12 | @interface UniversalAppAppDelegate : NSObject { 13 | UIWindow *window; 14 | UniversalAppViewController *viewController; 15 | } 16 | 17 | @property (nonatomic, strong) IBOutlet UIWindow *window; 18 | @property (nonatomic, strong) IBOutlet UniversalAppViewController *viewController; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /Demos/ContextFilter/MyContextFilter.m: -------------------------------------------------------------------------------- 1 | #import "MyContextFilter.h" 2 | #import "ThirdPartyFramework.h" 3 | 4 | 5 | @implementation MyContextFilter 6 | 7 | - (NSString *)formatLogMessage:(DDLogMessage *)logMessage 8 | { 9 | if (logMessage->logContext == TP_LOG_CONTEXT) 10 | { 11 | // We can filter this message by simply returning nil 12 | return nil; 13 | } 14 | else 15 | { 16 | // We could format this message if we wanted to here. 17 | // But this example is just about filtering. 18 | return logMessage->logMsg; 19 | } 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Demos/NonArcTest/NonArcTest/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /Framework/Desktop/FmwkTest/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /Demos/CaptureASL/CaptureASL/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /Demos/SQLiteLogger/SQLiteLogger/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /Documentation/PerLoggerLogLevels.md: -------------------------------------------------------------------------------- 1 | ### Use Log Level per Logger 2 | 3 | If you need a different log level for every logger (i.e. if you have a custom logger like Crashlytics logger that should not log Info or Debug info), you can easily achieve this using the `DDLog` `+addLogger:withLogLevel:` method. 4 | 5 | ```objective-c 6 | [DDLog addLogger:[DDASLLogger sharedInstance] withLogLevel:LOG_LEVEL_INFO]; 7 | [DDLog addLogger:[DDTTYLogger sharedInstance] withLogLevel:LOG_LEVEL_DEBUG]; 8 | ``` 9 | 10 | You can still use the old method `+addLogger:`, this one uses the LOG_LEVEL_VERBOSE as default, so no log is excluded. -------------------------------------------------------------------------------- /Demos/Benchmark/Desktop/BenchmarkMac/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /Demos/PerUserLogLevels/PerUserLogLevels/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /Demos/DispatchQueueLogger/DispatchQueueLogger/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Desktop/TestXcodeColors/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /Demos/NonArcTest/NonArcTest/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import 3 | 4 | // Log levels: off, error, warn, info, verbose 5 | static const int ddLogLevel = LOG_LEVEL_VERBOSE; 6 | 7 | 8 | @implementation AppDelegate 9 | 10 | @synthesize window = _window; 11 | 12 | - (void)dealloc 13 | { 14 | [super dealloc]; 15 | } 16 | 17 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 18 | { 19 | [DDLog addLogger:[DDASLLogger sharedInstance]]; 20 | [DDLog addLogger:[DDTTYLogger sharedInstance]]; 21 | 22 | DDLogVerbose(@"Testing"); 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Responses/HTTPFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "HTTPResponse.h" 3 | 4 | @class HTTPConnection; 5 | 6 | 7 | @interface HTTPFileResponse : NSObject 8 | { 9 | HTTPConnection *connection; 10 | 11 | NSString *filePath; 12 | UInt64 fileLength; 13 | UInt64 fileOffset; 14 | 15 | BOOL aborted; 16 | 17 | int fileFD; 18 | void *buffer; 19 | NSUInteger bufferSize; 20 | } 21 | 22 | - (id)initWithFilePath:(NSString *)filePath forConnection:(HTTPConnection *)connection; 23 | - (NSString *)filePath; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Web/styles.css: -------------------------------------------------------------------------------- 1 | table { 2 | margin-left: 10px; 3 | } 4 | 5 | td { 6 | background-color: pink; 7 | padding: 5px; 8 | } 9 | 10 | body { 11 | margin: 0px; 12 | } 13 | 14 | #status { 15 | height: 20px; 16 | width: 100%; 17 | color: #fff; 18 | background-color: orange; 19 | font-weight: bold; 20 | padding: 5px; 21 | text-align: center; 22 | } 23 | 24 | #container { 25 | padding: 20px; 26 | } 27 | 28 | ul { 29 | margin-top: 25px; 30 | } 31 | 32 | h1 { 33 | font-size: 2em; 34 | font-family: helvetica; 35 | margin: 10px; 36 | } 37 | 38 | ul a:link, ul a:visited { 39 | font-size: 1.5em; 40 | } 41 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Desktop/RegisteredLoggingTest/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /Framework/Desktop/FmwkTest/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import 3 | #import 4 | 5 | // Log levels: off, error, warn, info, verbose 6 | static const int ddLogLevel = LOG_LEVEL_VERBOSE; 7 | 8 | 9 | @implementation AppDelegate 10 | 11 | @synthesize window = _window; 12 | 13 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 14 | { 15 | [DDLog addLogger:[DDTTYLogger sharedInstance]]; 16 | 17 | DDLogVerbose(@"Verbose"); 18 | DDLogInfo(@"Info"); 19 | DDLogWarn(@"Warn"); 20 | DDLogError(@"Error"); 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Framework/Lumberjack.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 15 | 16 | 18 | 19 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Desktop/RegisteredLoggingTest/Lions.m: -------------------------------------------------------------------------------- 1 | #import "Lions.h" 2 | #import 3 | 4 | // Log levels: off, error, warn, info, verbose 5 | static int ddLogLevel = LOG_LEVEL_WARN; 6 | 7 | 8 | @implementation Lions 9 | 10 | + (int)ddLogLevel 11 | { 12 | return ddLogLevel; 13 | } 14 | 15 | + (void)ddSetLogLevel:(int)logLevel 16 | { 17 | ddLogLevel = logLevel; 18 | } 19 | 20 | + (void)logStuff 21 | { 22 | DDLogError(@"%@ - Error", THIS_FILE); 23 | DDLogWarn(@"%@ - Warn", THIS_FILE); 24 | DDLogInfo(@"%@ - Info", THIS_FILE); 25 | DDLogVerbose(@"%@ - Verbose", THIS_FILE); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/RegisteredLoggingTest/Lions.m: -------------------------------------------------------------------------------- 1 | #import "Lions.h" 2 | #import 3 | 4 | // Log levels: off, error, warn, info, verbose 5 | static int ddLogLevel = LOG_LEVEL_WARN; 6 | 7 | 8 | @implementation Lions 9 | 10 | + (int)ddLogLevel 11 | { 12 | return ddLogLevel; 13 | } 14 | 15 | + (void)ddSetLogLevel:(int)logLevel 16 | { 17 | ddLogLevel = logLevel; 18 | } 19 | 20 | + (void)logStuff 21 | { 22 | DDLogError(@"%@ - Error", THIS_FILE); 23 | DDLogWarn(@"%@ - Warn", THIS_FILE); 24 | DDLogInfo(@"%@ - Info", THIS_FILE); 25 | DDLogVerbose(@"%@ - Verbose", THIS_FILE); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Desktop/RegisteredLoggingTest/Tigers.m: -------------------------------------------------------------------------------- 1 | #import "Tigers.h" 2 | #import 3 | 4 | // Log levels: off, error, warn, info, verbose 5 | static int ddLogLevel = LOG_LEVEL_WARN; 6 | 7 | 8 | @implementation Tigers 9 | 10 | + (int)ddLogLevel 11 | { 12 | return ddLogLevel; 13 | } 14 | 15 | + (void)ddSetLogLevel:(int)logLevel 16 | { 17 | ddLogLevel = logLevel; 18 | } 19 | 20 | + (void)logStuff 21 | { 22 | DDLogError(@"%@ - Error", THIS_FILE); 23 | DDLogWarn(@"%@ - Warn", THIS_FILE); 24 | DDLogInfo(@"%@ - Info", THIS_FILE); 25 | DDLogVerbose(@"%@ - Verbose", THIS_FILE); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/RegisteredLoggingTest/Tigers.m: -------------------------------------------------------------------------------- 1 | #import "Tigers.h" 2 | #import 3 | 4 | // Log levels: off, error, warn, info, verbose 5 | static int ddLogLevel = LOG_LEVEL_WARN; 6 | 7 | 8 | @implementation Tigers 9 | 10 | + (int)ddLogLevel 11 | { 12 | return ddLogLevel; 13 | } 14 | 15 | + (void)ddSetLogLevel:(int)logLevel 16 | { 17 | ddLogLevel = logLevel; 18 | } 19 | 20 | + (void)logStuff 21 | { 22 | DDLogError(@"%@ - Error", THIS_FILE); 23 | DDLogWarn(@"%@ - Warn", THIS_FILE); 24 | DDLogInfo(@"%@ - Info", THIS_FILE); 25 | DDLogVerbose(@"%@ - Verbose", THIS_FILE); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Classes/WebServerIPhoneAppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class WebServerIPhoneViewController; 4 | @class DDFileLogger; 5 | @class HTTPServer; 6 | 7 | @interface WebServerIPhoneAppDelegate : NSObject 8 | { 9 | DDFileLogger *fileLogger; 10 | 11 | HTTPServer *httpServer; 12 | 13 | UIWindow *window; 14 | WebServerIPhoneViewController *viewController; 15 | } 16 | 17 | @property (nonatomic, readonly) DDFileLogger *fileLogger; 18 | 19 | @property (nonatomic, strong) IBOutlet UIWindow *window; 20 | @property (nonatomic, strong) IBOutlet WebServerIPhoneViewController *viewController; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /Benchmarking/PerformanceTesting.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define SPEED_TEST_0_COUNT 1000 // Total log statements 4 | #define SPEED_TEST_1_COUNT 1000 // Total log statements 5 | #define SPEED_TEST_2_COUNT 1000 // Total log statements 6 | #define SPEED_TEST_3_COUNT 250 // Per log level (multiply by 4 to get total) 7 | 8 | #define SPEED_TEST_4_VERBOSE_COUNT 900 9 | #define SPEED_TEST_4_INFO_COUNT 000 10 | #define SPEED_TEST_4_WARN_COUNT 000 11 | #define SPEED_TEST_4_ERROR_COUNT 100 12 | 13 | // Further documentation on these tests may be found in the implementation file. 14 | 15 | @interface PerformanceTesting : NSObject 16 | 17 | + (void)startPerformanceTests; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | project.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | *.xccheckout 16 | *.moved-aside 17 | DerivedData 18 | *.hmap 19 | *.ipa 20 | *.xcuserstate 21 | 22 | # CocoaPods 23 | # 24 | # We recommend against adding the Pods directory to your .gitignore. However 25 | # you should judge for yourself, the pros and cons are mentioned at: 26 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 27 | # 28 | Pods/ 29 | Podfile.lock 30 | LumberjackUser*.h 31 | .DS_Store 32 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Responses/HTTPErrorResponse.m: -------------------------------------------------------------------------------- 1 | #import "HTTPErrorResponse.h" 2 | 3 | @implementation HTTPErrorResponse 4 | 5 | -(id)initWithErrorCode:(int)httpErrorCode 6 | { 7 | if ((self = [super init])) 8 | { 9 | _status = httpErrorCode; 10 | } 11 | 12 | return self; 13 | } 14 | 15 | - (UInt64) contentLength { 16 | return 0; 17 | } 18 | 19 | - (UInt64) offset { 20 | return 0; 21 | } 22 | 23 | - (void)setOffset:(UInt64)offset { 24 | ; 25 | } 26 | 27 | - (NSData*) readDataOfLength:(NSUInteger)length { 28 | return nil; 29 | } 30 | 31 | - (BOOL) isDone { 32 | return YES; 33 | } 34 | 35 | - (NSInteger) status { 36 | return _status; 37 | } 38 | @end 39 | -------------------------------------------------------------------------------- /Demos/CaptureASL/CaptureASLTests/CaptureASLTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // CaptureASLTests.m 3 | // CaptureASLTests 4 | // 5 | // Created by Ernesto Rivera on 2014/03/20. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface CaptureASLTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation CaptureASLTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Demos/FineGrainedLogging/FineGrainedLoggingAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "FineGrainedLoggingAppDelegate.h" 2 | 3 | #import "MYLog.h" 4 | 5 | #import "TimerOne.h" 6 | #import "TimerTwo.h" 7 | 8 | // Debug levels: off, error, warn, info, verbose 9 | static const int ddLogLevel = LOG_LEVEL_VERBOSE; 10 | 11 | 12 | @implementation FineGrainedLoggingAppDelegate 13 | 14 | @synthesize window; 15 | 16 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 17 | { 18 | [DDLog addLogger:[DDASLLogger sharedInstance] withLogLevel:LOG_LEVEL_VERBOSE | LOG_FLAG_TIMERS]; 19 | [DDLog addLogger:[DDTTYLogger sharedInstance] withLogLevel:LOG_LEVEL_VERBOSE | LOG_FLAG_TIMERS]; 20 | 21 | timerOne = [[TimerOne alloc] init]; 22 | timerTwo = [[TimerTwo alloc] init]; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Demos/CaptureASL/CaptureASLTests/CaptureASLTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | CocoaLumberjack.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Demos/FineGrainedLogging/MYLog.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | // The first 4 bits are being used by the standard levels (0 - 3) 4 | // All other bits are fair game for us to use. 5 | 6 | #define LOG_FLAG_FOOD_TIMER (1 << 5) // 0...0100000 7 | #define LOG_FLAG_SLEEP_TIMER (1 << 6) // 0...1000000 8 | 9 | #define LOG_FOOD_TIMER (ddLogLevel & LOG_FLAG_FOOD_TIMER) 10 | #define LOG_SLEEP_TIMER (ddLogLevel & LOG_FLAG_SLEEP_TIMER) 11 | 12 | #define DDLogFoodTimer(frmt, ...) ASYNC_LOG_OBJC_MAYBE(ddLogLevel, LOG_FLAG_FOOD_TIMER, 0, frmt, ##__VA_ARGS__) 13 | #define DDLogSleepTimer(frmt, ...) ASYNC_LOG_OBJC_MAYBE(ddLogLevel, LOG_FLAG_SLEEP_TIMER, 0, frmt, ##__VA_ARGS__) 14 | 15 | // Now we decide which flags we want to enable in our application 16 | 17 | #define LOG_FLAG_TIMERS (LOG_FLAG_FOOD_TIMER | LOG_FLAG_SLEEP_TIMER) 18 | -------------------------------------------------------------------------------- /Demos/CustomLogLevels/CustomLogLevelsAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "CustomLogLevelsAppDelegate.h" 2 | 3 | #import "MYLog.h" 4 | 5 | // Debug levels: off, fatal, error, warn, notice, info, debug 6 | static const int ddLogLevel = LOG_LEVEL_DEBUG; 7 | 8 | 9 | @implementation CustomLogLevelsAppDelegate 10 | 11 | @synthesize window; 12 | 13 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 14 | { 15 | // since the verbose log level was undefined, we need to specify the log level for every logger 16 | [DDLog addLogger:[DDASLLogger sharedInstance] withLogLevel:LOG_LEVEL_DEBUG]; 17 | [DDLog addLogger:[DDTTYLogger sharedInstance] withLogLevel:LOG_LEVEL_DEBUG]; 18 | 19 | DDLogFatal(@"Fatal"); 20 | DDLogError(@"Error"); 21 | DDLogWarn(@"Warn"); 22 | DDLogNotice(@"Notice"); 23 | DDLogInfo(@"Info"); 24 | DDLogDebug(@"Debug"); 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Mime/MultipartMessageHeaderField.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | //----------------------------------------------------------------- 5 | // interface MultipartMessageHeaderField 6 | //----------------------------------------------------------------- 7 | 8 | @interface MultipartMessageHeaderField : NSObject { 9 | NSString* name; 10 | NSString* value; 11 | NSMutableDictionary* params; 12 | } 13 | 14 | @property (strong, readonly) NSString* value; 15 | @property (strong, readonly) NSDictionary* params; 16 | @property (strong, readonly) NSString* name; 17 | 18 | //- (id) initWithLine:(NSString*) line; 19 | //- (id) initWithName:(NSString*) paramName value:(NSString*) paramValue; 20 | 21 | - (id) initWithData:(NSData*) data contentEncoding:(NSStringEncoding) encoding; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Demos/GlobalLogLevel/GlobalLogLevelAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "GlobalLogLevelAppDelegate.h" 2 | #import "Stuff.h" 3 | #import "MyLogging.h" 4 | 5 | int ddLogLevel; 6 | 7 | @implementation GlobalLogLevelAppDelegate 8 | 9 | @synthesize window; 10 | 11 | void someFunction() 12 | { 13 | DDLogError(@"%@: C_Error", THIS_FILE); 14 | DDLogWarn(@"%@: C_Warn", THIS_FILE); 15 | DDLogInfo(@"%@: C_Info", THIS_FILE); 16 | DDLogVerbose(@"%@: C_Verbose", THIS_FILE); 17 | } 18 | 19 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 20 | { 21 | ddLogLevel = LOG_LEVEL_VERBOSE; 22 | [DDLog addLogger:[DDTTYLogger sharedInstance]]; 23 | 24 | DDLogError(@"%@: Error", THIS_FILE); 25 | DDLogWarn(@"%@: Warn", THIS_FILE); 26 | DDLogInfo(@"%@: Info", THIS_FILE); 27 | DDLogVerbose(@"%@: Verbose", THIS_FILE); 28 | 29 | someFunction(); 30 | 31 | ddLogLevel = LOG_LEVEL_WARN; 32 | 33 | [Stuff doStuff]; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Framework/Desktop/Lumberjack/Lumberjack-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.deusty.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Demos/CLI/CLI/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CLI 4 | // 5 | // Created by Ernesto Rivera on 2013/12/19. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | static const int ddLogLevel = LOG_LEVEL_VERBOSE; 12 | 13 | int main(int argc, const char * argv[]) 14 | { 15 | @autoreleasepool { 16 | 17 | // Test 18 | DDTTYLogger * logger = [DDTTYLogger sharedInstance]; 19 | logger.colorsEnabled = YES; 20 | [logger setForegroundColor:[DDColor colorWithCalibratedRed:26.0/255.0 21 | green:158.0/255.0 22 | blue:4.0/255.0 23 | alpha:1.0] 24 | backgroundColor:nil 25 | forFlag:LOG_FLAG_INFO]; 26 | [DDLog addLogger:logger]; 27 | DDLogInfo(@"Hello, World!"); 28 | } 29 | return 0; 30 | } 31 | 32 | -------------------------------------------------------------------------------- /Demos/CaptureASL/CaptureASL/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // CaptureASL 4 | // 5 | // Created by Ernesto Rivera on 2014/03/20. 6 | // 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import 11 | #import 12 | 13 | @interface SimpleFormatter : NSObject 14 | 15 | @end 16 | 17 | @implementation SimpleFormatter 18 | 19 | - (NSString *)formatLogMessage:(DDLogMessage *)logMessage 20 | { 21 | return [NSString stringWithFormat:@" Captured: %@", logMessage->logMsg]; 22 | } 23 | 24 | @end 25 | 26 | 27 | @implementation AppDelegate 28 | 29 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 30 | { 31 | DDTTYLogger.sharedInstance.logFormatter = [SimpleFormatter new]; 32 | [DDLog addLogger:DDTTYLogger.sharedInstance]; 33 | [DDLog addLogger:DDASLLogger.sharedInstance]; 34 | 35 | [DDASLLogCapture start]; 36 | 37 | return YES; 38 | } 39 | 40 | @end 41 | 42 | 43 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/WebServerIPhone-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.voalte.test.slimlog 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Desktop/RegisteredLoggingTest/RegisteredLoggingTestAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "RegisteredLoggingTestAppDelegate.h" 2 | #import 3 | #import "Lions.h" 4 | #import "Tigers.h" 5 | 6 | // Log levels: off, error, warn, info, verbose 7 | static int ddLogLevel = LOG_LEVEL_VERBOSE; 8 | 9 | 10 | @implementation RegisteredLoggingTestAppDelegate 11 | 12 | @synthesize window; 13 | 14 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 15 | { 16 | [DDLog addLogger:[DDTTYLogger sharedInstance]]; 17 | 18 | [Lions logStuff]; 19 | [Tigers logStuff]; 20 | 21 | NSArray *registeredClassNames = [DDLog registeredClassNames]; 22 | DDLogVerbose(@"registeredClassNames: %@", registeredClassNames); 23 | 24 | NSArray *registeredClasses = [DDLog registeredClasses]; 25 | for (Class class in registeredClasses) 26 | { 27 | [class ddSetLogLevel:LOG_LEVEL_VERBOSE]; 28 | } 29 | 30 | [Lions logStuff]; 31 | [Tigers logStuff]; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Demos/UniversalApp/UniversalApp-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/HTTPAuthenticationRequest.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if TARGET_OS_IPHONE 4 | // Note: You may need to add the CFNetwork Framework to your project 5 | #import 6 | #endif 7 | 8 | @class HTTPMessage; 9 | 10 | 11 | @interface HTTPAuthenticationRequest : NSObject 12 | { 13 | BOOL isBasic; 14 | BOOL isDigest; 15 | 16 | NSString *base64Credentials; 17 | 18 | NSString *username; 19 | NSString *realm; 20 | NSString *nonce; 21 | NSString *uri; 22 | NSString *qop; 23 | NSString *nc; 24 | NSString *cnonce; 25 | NSString *response; 26 | } 27 | - (id)initWithRequest:(HTTPMessage *)request; 28 | 29 | - (BOOL)isBasic; 30 | - (BOOL)isDigest; 31 | 32 | // Basic 33 | - (NSString *)base64Credentials; 34 | 35 | // Digest 36 | - (NSString *)username; 37 | - (NSString *)realm; 38 | - (NSString *)nonce; 39 | - (NSString *)uri; 40 | - (NSString *)qop; 41 | - (NSString *)nc; 42 | - (NSString *)cnonce; 43 | - (NSString *)response; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Demos/Benchmark/Mobile/BenchmarkIPhone-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.voalte.test.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /Demos/CustomFormatters/CustomFormattersAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "CustomFormattersAppDelegate.h" 2 | 3 | #import 4 | #import "TestFormatter.h" 5 | 6 | // Debug levels: off, error, warn, info, verbose 7 | static const int ddLogLevel = LOG_LEVEL_VERBOSE; 8 | 9 | 10 | @implementation CustomFormattersAppDelegate 11 | 12 | @synthesize window; 13 | 14 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 15 | { 16 | // Setup logging (with our custom formatter) 17 | 18 | TestFormatter *formatter = [[TestFormatter alloc] init]; 19 | 20 | [[DDASLLogger sharedInstance] setLogFormatter:formatter]; 21 | [[DDTTYLogger sharedInstance] setLogFormatter:formatter]; 22 | 23 | [DDLog addLogger:[DDASLLogger sharedInstance]]; 24 | [DDLog addLogger:[DDTTYLogger sharedInstance]]; 25 | 26 | // Log some messages 27 | 28 | DDLogError(@"Paper Jam!"); 29 | DDLogWarn(@"Low toner"); 30 | DDLogInfo(@"Printing SalesProjections.doc"); 31 | DDLogVerbose(@"Warming up toner"); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Demos/SQLiteLogger/FMDB/FMDatabaseAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // FMDatabaseAdditions.h 3 | // fmkit 4 | // 5 | // Created by August Mueller on 10/30/05. 6 | // Copyright 2005 Flying Meat Inc.. All rights reserved. 7 | // 8 | 9 | #import 10 | @interface FMDatabase (FMDatabaseAdditions) 11 | 12 | 13 | - (int)intForQuery:(NSString*)objs, ...; 14 | - (long)longForQuery:(NSString*)objs, ...; 15 | - (BOOL)boolForQuery:(NSString*)objs, ...; 16 | - (double)doubleForQuery:(NSString*)objs, ...; 17 | - (NSString*)stringForQuery:(NSString*)objs, ...; 18 | - (NSData*)dataForQuery:(NSString*)objs, ...; 19 | - (NSDate*)dateForQuery:(NSString*)objs, ...; 20 | 21 | // Notice that there's no dataNoCopyForQuery:. 22 | // That would be a bad idea, because we close out the result set, and then what 23 | // happens to the data that we just didn't copy? Who knows, not I. 24 | 25 | 26 | - (BOOL)tableExists:(NSString*)tableName; 27 | - (FMResultSet*)getSchema; 28 | - (FMResultSet*)getTableSchema:(NSString*)tableName; 29 | - (BOOL)columnExists:(NSString*)tableName columnName:(NSString*)columnName; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Benchmarking/Results/Benchmark iMac.csv: -------------------------------------------------------------------------------- 1 | 0, 0.6169, 0.6700, 0.7403 2 | 1, 0.0000, 0.0000, 0.0000 3 | 2, 0.0000, 0.0000, 0.0000 4 | 3, 0.0000, 0.0000, 0.0000 5 | 4, 0.0000, 0.0000, 0.0000 6 | 5, 0.0000, 0.0000, 0.0000 7 | 6, 0.0000, 0.0000, 0.0000 8 | 10, 0.6106, 0.6640, 0.7329 9 | 11, 0.0184, 0.0268, 0.0466 10 | 12, 0.0185, 0.0243, 0.0477 11 | 13, 0.0183, 0.0213, 0.0234 12 | 14, 0.0213, 0.0223, 0.0246 13 | 15, 0.0182, 0.0231, 0.0426 14 | 16, 0.0182, 0.0207, 0.0286 15 | 20, 0.6167, 0.6651, 0.7365 16 | 21, 0.2614, 0.3090, 0.3966 17 | 22, 0.2672, 0.3121, 0.3805 18 | 23, 0.0541, 0.0675, 0.0834 19 | 24, 0.0541, 0.0576, 0.0824 20 | 25, 0.2795, 0.3334, 0.4408 21 | 26, 0.2847, 0.3438, 0.4951 22 | 30, 0.6077, 0.6560, 0.7029 23 | 31, 0.0676, 0.0997, 0.2275 24 | 32, 0.0723, 0.0945, 0.1568 25 | 33, 0.0188, 0.0191, 0.0203 26 | 34, 0.0187, 0.0192, 0.0233 27 | 35, 0.0723, 0.0886, 0.1579 28 | 36, 0.0774, 0.0934, 0.1095 29 | 40, 0.6101, 0.6597, 0.7372 30 | 41, 0.0189, 0.0308, 0.0484 31 | 42, 0.0237, 0.0322, 0.0468 32 | 43, 0.0053, 0.0054, 0.0056 33 | 44, 0.0053, 0.0055, 0.0057 34 | 45, 0.0233, 0.0347, 0.0780 35 | 46, 0.0223, 0.0316, 0.0559 36 | -------------------------------------------------------------------------------- /Benchmarking/Results/Benchmark iPad.csv: -------------------------------------------------------------------------------- 1 | 0, 2.4968, 2.5606, 2.7525 2 | 1, 0.0001, 0.0001, 0.0001 3 | 2, 0.0000, 0.0000, 0.0000 4 | 3, 0.0000, 0.0000, 0.0000 5 | 4, 0.0000, 0.0014, 0.0285 6 | 5, 0.0000, 0.0000, 0.0001 7 | 6, 0.0000, 0.0000, 0.0000 8 | 10, 2.5016, 2.5982, 2.7952 9 | 11, 0.2299, 0.5288, 1.2570 10 | 12, 0.2845, 0.5943, 0.8713 11 | 13, 0.3455, 0.3955, 0.5355 12 | 14, 0.2955, 0.3814, 0.4431 13 | 15, 0.2304, 0.5469, 0.9735 14 | 16, 0.2761, 0.4723, 0.7460 15 | 20, 2.5067, 2.5589, 2.6211 16 | 21, 1.5797, 1.8261, 2.1204 17 | 22, 1.8572, 1.9808, 2.1686 18 | 23, 0.4198, 0.4877, 0.5202 19 | 24, 0.4220, 0.4873, 0.5729 20 | 25, 2.0504, 2.2492, 2.4038 21 | 26, 2.1307, 2.3070, 2.4938 22 | 30, 2.5003, 2.5565, 2.6215 23 | 31, 0.5118, 0.6478, 0.8476 24 | 32, 0.5157, 0.6690, 0.8628 25 | 33, 0.1525, 0.2119, 0.2614 26 | 34, 0.1407, 0.2039, 0.2715 27 | 35, 0.5535, 0.6758, 0.8734 28 | 36, 0.5397, 0.6877, 0.8979 29 | 40, 2.4872, 2.5404, 2.5948 30 | 41, 0.1454, 0.2044, 0.3307 31 | 42, 0.1604, 0.2122, 0.2885 32 | 43, 0.0287, 0.0484, 0.0962 33 | 44, 0.0286, 0.0480, 0.1025 34 | 45, 0.1542, 0.2173, 0.3335 35 | 46, 0.1521, 0.2266, 0.3015 36 | -------------------------------------------------------------------------------- /Benchmarking/Results/Benchmark PowerMac.csv: -------------------------------------------------------------------------------- 1 | 0, 0.2724, 0.2816, 0.3198 2 | 1, 0.0000, 0.0000, 0.0000 3 | 2, 0.0000, 0.0000, 0.0000 4 | 3, 0.0000, 0.0000, 0.0000 5 | 4, 0.0000, 0.0000, 0.0000 6 | 5, 0.0000, 0.0000, 0.0000 7 | 6, 0.0000, 0.0000, 0.0000 8 | 10, 0.2710, 0.2757, 0.2826 9 | 11, 0.0032, 0.0035, 0.0043 10 | 12, 0.0032, 0.0036, 0.0066 11 | 13, 0.0032, 0.0032, 0.0033 12 | 14, 0.0032, 0.0032, 0.0033 13 | 15, 0.0032, 0.0035, 0.0054 14 | 16, 0.0032, 0.0037, 0.0065 15 | 20, 0.2715, 0.2804, 0.3601 16 | 21, 0.0996, 0.1037, 0.1090 17 | 22, 0.0984, 0.1042, 0.1265 18 | 23, 0.0296, 0.0311, 0.0370 19 | 24, 0.0294, 0.0301, 0.0314 20 | 25, 0.1118, 0.1523, 0.8192 21 | 26, 0.1089, 0.1138, 0.1204 22 | 30, 0.2720, 0.2760, 0.2842 23 | 31, 0.0251, 0.0269, 0.0287 24 | 32, 0.0260, 0.0273, 0.0298 25 | 33, 0.0080, 0.0084, 0.0089 26 | 34, 0.0079, 0.0084, 0.0091 27 | 35, 0.0278, 0.0298, 0.0322 28 | 36, 0.0277, 0.0299, 0.0319 29 | 40, 0.2707, 0.2797, 0.3354 30 | 41, 0.0095, 0.0103, 0.0112 31 | 42, 0.0096, 0.0104, 0.0113 32 | 43, 0.0028, 0.0030, 0.0034 33 | 44, 0.0028, 0.0029, 0.0031 34 | 45, 0.0098, 0.0112, 0.0120 35 | 46, 0.0104, 0.0114, 0.0122 36 | -------------------------------------------------------------------------------- /Benchmarking/Results/Benchmark iPhone 3GS.csv: -------------------------------------------------------------------------------- 1 | 0, 4.2598, 4.3660, 4.6588 2 | 1, 0.0000, 0.0000, 0.0000 3 | 2, 0.0000, 0.0000, 0.0000 4 | 3, 0.0000, 0.0000, 0.0000 5 | 4, 0.0000, 0.0000, 0.0000 6 | 5, 0.0000, 0.0000, 0.0000 7 | 6, 0.0000, 0.0000, 0.0000 8 | 10, 4.1986, 4.3513, 4.5088 9 | 11, 0.5951, 1.5768, 2.3934 10 | 12, 1.0329, 1.5809, 2.1354 11 | 13, 0.2904, 0.3407, 0.4357 12 | 14, 0.2413, 0.3309, 0.3610 13 | 15, 0.6748, 1.2716, 1.6643 14 | 16, 0.7571, 1.3473, 2.3276 15 | 20, 4.2224, 4.3516, 4.5251 16 | 21, 3.1635, 3.2748, 3.5510 17 | 22, 3.2119, 3.2817, 3.4837 18 | 23, 0.4739, 0.4894, 0.6311 19 | 24, 0.4719, 0.4800, 0.5312 20 | 25, 3.4027, 3.5172, 3.7449 21 | 26, 3.3843, 3.4736, 3.7347 22 | 30, 4.1721, 4.3516, 4.5596 23 | 31, 0.9029, 1.2367, 1.5529 24 | 32, 0.9005, 1.2779, 1.5703 25 | 33, 0.1541, 0.1928, 0.2365 26 | 34, 0.1533, 0.1986, 0.2383 27 | 35, 0.8691, 1.1347, 1.5500 28 | 36, 0.8477, 1.1970, 1.6069 29 | 40, 4.1914, 4.3369, 4.6224 30 | 41, 0.3008, 0.3281, 0.4669 31 | 42, 0.2909, 0.3252, 0.4046 32 | 43, 0.0470, 0.0478, 0.0488 33 | 44, 0.0471, 0.0481, 0.0527 34 | 45, 0.3151, 0.3484, 0.4229 35 | 46, 0.3111, 0.3480, 0.4136 36 | -------------------------------------------------------------------------------- /Benchmarking/Results/Benchmark iPodTouch3 GCD.csv: -------------------------------------------------------------------------------- 1 | 0, 4.7533, 4.8965, 5.1468 2 | 1, 0.0000, 0.0000, 0.0000 3 | 2, 0.0000, 0.0000, 0.0000 4 | 3, 0.0000, 0.0000, 0.0000 5 | 4, 0.0000, 0.0000, 0.0000 6 | 5, 0.0000, 0.0000, 0.0000 7 | 6, 0.0000, 0.0000, 0.0000 8 | 10, 4.7739, 4.8658, 5.0876 9 | 11, 0.1744, 0.7295, 1.3352 10 | 12, 0.2169, 0.7354, 1.4760 11 | 13, 0.1846, 0.2992, 0.4073 12 | 14, 0.1816, 0.2980, 0.3568 13 | 15, 0.1840, 0.8697, 1.5107 14 | 16, 0.0834, 0.7477, 1.1599 15 | 20, 4.7807, 4.9025, 5.1423 16 | 21, 3.1918, 3.3175, 3.5093 17 | 22, 3.1522, 3.2813, 3.5148 18 | 23, 0.3052, 0.3182, 0.3852 19 | 24, 0.3061, 0.3171, 0.3410 20 | 25, 3.5837, 3.7104, 3.9758 21 | 26, 3.5487, 3.6969, 3.9776 22 | 30, 4.7613, 4.8927, 5.1026 23 | 31, 0.8053, 1.0718, 1.3799 24 | 32, 0.8069, 1.0888, 1.3447 25 | 33, 0.1194, 0.1577, 0.1813 26 | 34, 0.1249, 0.1523, 0.1777 27 | 35, 0.9295, 1.2310, 1.4301 28 | 36, 0.9240, 1.2278, 1.5636 29 | 40, 4.8084, 4.8773, 5.0500 30 | 41, 0.2822, 0.3202, 0.3642 31 | 42, 0.3091, 0.3291, 0.3686 32 | 43, 0.0302, 0.0313, 0.0341 33 | 44, 0.0295, 0.0308, 0.0328 34 | 45, 0.3281, 0.3669, 0.4102 35 | 46, 0.3359, 0.3710, 0.3960 36 | -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /Classes/CLI/CLIColor.h: -------------------------------------------------------------------------------- 1 | // Software License Agreement (BSD License) 2 | // 3 | // Copyright (c) 2010-2014, Deusty, LLC 4 | // All rights reserved. 5 | // 6 | // Redistribution and use of this software in source and binary forms, 7 | // with or without modification, are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Neither the name of Deusty nor the names of its contributors may be used 13 | // to endorse or promote products derived from this software without specific 14 | // prior written permission of Deusty, LLC. 15 | 16 | #import 17 | 18 | /** 19 | * This class represents an NSColor replacement for CLI projects that don't link with AppKit 20 | **/ 21 | 22 | @interface CLIColor : NSObject 23 | 24 | + (CLIColor *)colorWithCalibratedRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha; 25 | - (void)getRed:(CGFloat *)red green:(CGFloat *)green blue:(CGFloat *)blue alpha:(CGFloat *)alpha; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Classes/DDASLLogCapture.h: -------------------------------------------------------------------------------- 1 | // Software License Agreement (BSD License) 2 | // 3 | // Copyright (c) 2010-2014, Deusty, LLC 4 | // All rights reserved. 5 | // 6 | // Redistribution and use of this software in source and binary forms, 7 | // with or without modification, are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Neither the name of Deusty nor the names of its contributors may be used 13 | // to endorse or promote products derived from this software without specific 14 | // prior written permission of Deusty, LLC. 15 | 16 | #import "DDASLLogger.h" 17 | 18 | @protocol DDLogger; 19 | 20 | /** 21 | * This class provides the ability to capture the ASL (Apple System Logs) 22 | */ 23 | @interface DDASLLogCapture : NSObject 24 | 25 | + (void)start; 26 | + (void)stop; 27 | 28 | // Default log level: LOG_LEVEL_VERBOSE (i.e. capture all ASL messages). 29 | + (DDLogLevel)captureLogLevel; 30 | + (void)setCaptureLogLevel:(DDLogLevel)LOG_LEVEL_XXX; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Demos/ContextFilter/ContextFilter-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/NonArcTest/NonArcTest/NonArcTest-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.deusty.oss.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/SQLiteLogger/SQLiteLogger/SQLiteLogger-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.deusty.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/CustomFormatters/CustomFormatters-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleShortVersionString 22 | 1.0 23 | LSMinimumSystemVersion 24 | ${MACOSX_DEPLOYMENT_TARGET} 25 | CFBundleVersion 26 | 1 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/CustomLogLevels/CustomLogLevels-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleShortVersionString 22 | 1.0 23 | LSMinimumSystemVersion 24 | ${MACOSX_DEPLOYMENT_TARGET} 25 | CFBundleVersion 26 | 1 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/GlobalLogLevel/GlobalLogLevel-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/OverflowTestMac/OverflowTestMac-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleShortVersionString 22 | 1.0 23 | LSMinimumSystemVersion 24 | ${MACOSX_DEPLOYMENT_TARGET} 25 | CFBundleVersion 26 | 1 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/RollingTestMac/RollingTestMac-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleShortVersionString 22 | 1.0 23 | LSMinimumSystemVersion 24 | ${MACOSX_DEPLOYMENT_TARGET} 25 | CFBundleVersion 26 | 1 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/Benchmark/Desktop/BenchmarkMac/BenchmarkMac-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.deusty.oss.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/CoreDataLogger-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.deusty.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/FineGrainedLogging/FineGrainedLogging-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleShortVersionString 22 | 1.0 23 | LSMinimumSystemVersion 24 | ${MACOSX_DEPLOYMENT_TARGET} 25 | CFBundleVersion 26 | 1 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/LogFileCompressor/LogFileCompressor-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleShortVersionString 22 | 1.0 23 | LSMinimumSystemVersion 24 | ${MACOSX_DEPLOYMENT_TARGET} 25 | CFBundleVersion 26 | 1 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/PerUserLogLevels/PerUserLogLevels/PerUserLogLevels-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.deusty.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Desktop/TestXcodeColors/TestXcodeColors-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.deusty.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/DispatchQueueLogger/DispatchQueueLogger/DispatchQueueLogger-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.deusty.oss.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import "ViewController.h" 3 | 4 | #import 5 | #import 6 | #import "Formatter.h" 7 | 8 | // Log levels: off, error, warn, info, verbose 9 | static const int ddLogLevel = LOG_LEVEL_VERBOSE; 10 | 11 | static void printSomething() { 12 | DDLogVerbose(@"Verbose"); 13 | DDLogDebug(@"Debug"); 14 | DDLogInfo(@"Info"); 15 | DDLogWarn(@"Warn"); 16 | DDLogError(@"Error"); 17 | } 18 | 19 | 20 | @implementation AppDelegate 21 | 22 | @synthesize window = _window; 23 | @synthesize viewController = _viewController; 24 | 25 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 26 | { 27 | Formatter *formatter = [[Formatter alloc] init]; 28 | [[DDTTYLogger sharedInstance] setLogFormatter:formatter]; 29 | [DDLog addLogger:[DDTTYLogger sharedInstance]]; 30 | 31 | DDLogVerbose(@"Verbose"); 32 | DDLogDebug(@"Debug"); 33 | DDLogInfo(@"Info"); 34 | DDLogWarn(@"Warn"); 35 | DDLogError(@"Error"); 36 | 37 | printSomething(); 38 | 39 | return YES; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Desktop/RegisteredLoggingTest/RegisteredLoggingTest-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.deusty.oss.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Mime/MultipartMessageHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MultipartMessagePart.h 3 | // HttpServer 4 | // 5 | // Created by Валерий Гаврилов on 29.03.12. 6 | // Copyright (c) 2012 LLC "Online Publishing Partners" (onlinepp.ru). All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | //----------------------------------------------------------------- 13 | // interface MultipartMessageHeader 14 | //----------------------------------------------------------------- 15 | enum { 16 | contentTransferEncoding_unknown, 17 | contentTransferEncoding_7bit, 18 | contentTransferEncoding_8bit, 19 | contentTransferEncoding_binary, 20 | contentTransferEncoding_base64, 21 | contentTransferEncoding_quotedPrintable, 22 | }; 23 | 24 | @interface MultipartMessageHeader : NSObject { 25 | NSMutableDictionary* fields; 26 | int encoding; 27 | NSString* contentDispositionName; 28 | } 29 | @property (strong,readonly) NSDictionary* fields; 30 | @property (readonly) int encoding; 31 | 32 | - (id) initWithData:(NSData*) data formEncoding:(NSStringEncoding) encoding; 33 | @end 34 | -------------------------------------------------------------------------------- /Framework/Desktop/FmwkTest/FmwkTest-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.deusty.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSHumanReadableCopyright 28 | Copyright © 2012 __MyCompanyName__. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /Demos/FineGrainedLogging/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This Xcode project demonstrates fine grained logging. The Lumberjack framework supports much more than simple log levels. For example, you might want to categorize your log statements according to functionality. This would allow you to toggle log statements according to the modules you are currently developing. For example: 2 | 3 | DDLogEngine(@"Low oil"); 4 | DDLogRadio(@"Switching to FM2"); 5 | 6 | It could even be more advanced than this. You might have log levels within the separate log statements. For example: 7 | 8 | DDLogEngineWarn(@"Low oil"); 9 | DDLogRadioVerbose(@"Switching to FM2"); 10 | 11 | Then you could change log levels per module. 12 | 13 | As you can see, the framework is very flexible. Each project may have different logging requirements, and you can customize the framework to match your needs. 14 | 15 | This particular project demonstrates adding two new log statements based on functionality. They represent hypothetical timers which are critical to the application. The implementation of these timers also spans across multiple files, so there is a need to have central control over the log statements. 16 | 17 | For more information, see the Wiki article: 18 | https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/FineGrainedLogging 19 | -------------------------------------------------------------------------------- /Demos/CaptureASL/CaptureASL/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // CaptureASL 4 | // 5 | // Created by Ernesto Rivera on 2014/03/20. 6 | // 7 | // 8 | 9 | #import "ViewController.h" 10 | #import 11 | 12 | @implementation ViewController 13 | { 14 | int count; 15 | aslclient client; 16 | } 17 | 18 | - (void)awakeFromNib 19 | { 20 | [super awakeFromNib]; 21 | 22 | count = 0; 23 | client = asl_open(NULL, "CocoaLumberjack.CaptureASL", 0); 24 | } 25 | 26 | - (IBAction)log:(id)sender 27 | { 28 | NSLog(@"ASL test message %d", count++); 29 | } 30 | 31 | - (IBAction)asl_log:(UIButton *)sender 32 | { 33 | char *level = NULL; 34 | switch (sender.tag) 35 | { 36 | case 0 : level = "ASL_LEVEL_EMERG"; break; 37 | case 1 : level = "ASL_LEVEL_ALERT"; break; 38 | case 2 : level = "ASL_LEVEL_CRIT"; break; 39 | case 3 : level = "ASL_LEVEL_ERR"; break; 40 | case 4 : level = "ASL_LEVEL_WARNING"; break; 41 | case 5 : level = "ASL_LEVEL_NOTICE"; break; 42 | case 6 : level = "ASL_LEVEL_INFO"; break; 43 | case 7 : level = "ASL_LEVEL_DEBUG"; break; 44 | } 45 | asl_log(client, NULL, (int)sender.tag, "%s test message %d", level, count++); 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Demos/SQLiteLogger/FMDBLogger.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @class FMDatabase; 5 | 6 | 7 | @interface FMDBLogger : DDAbstractDatabaseLogger 8 | { 9 | @private 10 | NSString *logDirectory; 11 | NSMutableArray *pendingLogEntries; 12 | 13 | FMDatabase *database; 14 | } 15 | 16 | /** 17 | * Initializes an instance set to save it's sqlite file to the given directory. 18 | * If the directory doesn't already exist, it is automatically created. 19 | **/ 20 | - (id)initWithLogDirectory:(NSString *)logDirectory; 21 | 22 | // 23 | // This class inherits from DDAbstractDatabaseLogger. 24 | // 25 | // So there are a bunch of options such as: 26 | // 27 | // @property (assign, readwrite) NSUInteger saveThreshold; 28 | // @property (assign, readwrite) NSTimeInterval saveInterval; 29 | // 30 | // @property (assign, readwrite) NSTimeInterval maxAge; 31 | // @property (assign, readwrite) NSTimeInterval deleteInterval; 32 | // @property (assign, readwrite) BOOL deleteOnEverySave; 33 | // 34 | // And methods such as: 35 | // 36 | // - (void)savePendingLogEntries; 37 | // - (void)deleteOldLogEntries; 38 | // 39 | // These options and methods are documented extensively in DDAbstractDatabaseLogger.h 40 | // 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Documentation/ProblemSolution.md: -------------------------------------------------------------------------------- 1 | Common issues you may encounter and their solutions. 2 | 3 | ### NSConcreteStackBlock 4 | 5 | Your application fails to launch, and you see a crash message that looks something like 6 | > Dyld Error Message: Symbol not found: **NSConcreteStackBlock 7 | 8 | This seems to be an issue with LLVM, and blocks in general. It seems to affect those using Xcode 3, and targeting either Mac OS X 10.5 or iOS 3.X, and perhaps using the LLVM compiler. 9 | 10 | A solution was posted to [StackOverflow](http://stackoverflow.com/questions/3313786/ios-4-app-crashes-at-startup-on-ios-3-1-3-symbol-not-found-nsconcretestackblo), and states that you should specify the linker flag 11 | ```objective-c 12 | -weak_library /usr/lib/libSystem.B.dylib 13 | ``` 14 | 15 | This was also reported in Issue \#10 (concerning Mac OS X 10.5), and the linker flag was reported to work. 16 | 17 | ### Xcode 4.4 or later required 18 | 19 | **Problem:** Your application fails to build because of the Xcode modern syntax @{} for dictionaries ... 20 | 21 | **Cause:** This is because Xcode 4.4 or later is required to process this. 22 | 23 | **Solution:** Upgrade to the latest Xcode version. 24 | 25 | **Mac OS X 10.6 solution:** If you still need to support Mac OS X 10.6, please use an older version of Lumberjack that can be built using an older Xcode -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/RegisteredLoggingTest/RegisteredLoggingTestAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "RegisteredLoggingTestAppDelegate.h" 2 | #import "RegisteredLoggingTestViewController.h" 3 | #import 4 | #import "Lions.h" 5 | #import "Tigers.h" 6 | 7 | // Log levels: off, error, warn, info, verbose 8 | static int ddLogLevel = LOG_LEVEL_VERBOSE; 9 | 10 | 11 | @implementation RegisteredLoggingTestAppDelegate 12 | 13 | @synthesize window = _window; 14 | @synthesize viewController = _viewController; 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 17 | { 18 | [DDLog addLogger:[DDTTYLogger sharedInstance]]; 19 | 20 | [Lions logStuff]; 21 | [Tigers logStuff]; 22 | 23 | NSArray *registeredClassNames = [DDLog registeredClassNames]; 24 | DDLogVerbose(@"registeredClassNames: %@", registeredClassNames); 25 | 26 | NSArray *registeredClasses = [DDLog registeredClasses]; 27 | for (Class class in registeredClasses) 28 | { 29 | [class ddSetLogLevel:LOG_LEVEL_VERBOSE]; 30 | } 31 | 32 | [Lions logStuff]; 33 | [Tigers logStuff]; 34 | 35 | self.window.rootViewController = self.viewController; 36 | [self.window makeKeyAndVisible]; 37 | return YES; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/HTTPMessage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * The HTTPMessage class is a simple Objective-C wrapper around Apple's CFHTTPMessage class. 3 | **/ 4 | 5 | #import 6 | 7 | #if TARGET_OS_IPHONE 8 | // Note: You may need to add the CFNetwork Framework to your project 9 | #import 10 | #endif 11 | 12 | #define HTTPVersion1_0 ((NSString *)kCFHTTPVersion1_0) 13 | #define HTTPVersion1_1 ((NSString *)kCFHTTPVersion1_1) 14 | 15 | 16 | @interface HTTPMessage : NSObject 17 | { 18 | CFHTTPMessageRef message; 19 | } 20 | 21 | - (id)initEmptyRequest; 22 | 23 | - (id)initRequestWithMethod:(NSString *)method URL:(NSURL *)url version:(NSString *)version; 24 | 25 | - (id)initResponseWithStatusCode:(NSInteger)code description:(NSString *)description version:(NSString *)version; 26 | 27 | - (BOOL)appendData:(NSData *)data; 28 | 29 | - (BOOL)isHeaderComplete; 30 | 31 | - (NSString *)version; 32 | 33 | - (NSString *)method; 34 | - (NSURL *)url; 35 | 36 | - (NSInteger)statusCode; 37 | 38 | - (NSDictionary *)allHeaderFields; 39 | - (NSString *)headerField:(NSString *)headerField; 40 | 41 | - (void)setHeaderField:(NSString *)headerField value:(NSString *)headerFieldValue; 42 | 43 | - (NSData *)messageData; 44 | 45 | - (NSData *)body; 46 | - (void)setBody:(NSData *)body; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Classes/Extensions/DDMultiFormatter.h: -------------------------------------------------------------------------------- 1 | // Software License Agreement (BSD License) 2 | // 3 | // Copyright (c) 2010-2014, Deusty, LLC 4 | // All rights reserved. 5 | // 6 | // Redistribution and use of this software in source and binary forms, 7 | // with or without modification, are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Neither the name of Deusty nor the names of its contributors may be used 13 | // to endorse or promote products derived from this software without specific 14 | // prior written permission of Deusty, LLC. 15 | 16 | #import 17 | #import "DDLog.h" 18 | 19 | /** 20 | * This formatter can be used to chain different formatters together. 21 | * The log message will processed in the order of the formatters added. 22 | **/ 23 | 24 | @interface DDMultiFormatter : NSObject 25 | 26 | /** 27 | * Array of chained formatters 28 | */ 29 | @property (readonly) NSArray *formatters; 30 | 31 | - (void)addFormatter:(id)formatter; 32 | - (void)removeFormatter:(id)formatter; 33 | - (void)removeAllFormatters; 34 | - (BOOL)isFormattingWithFormatter:(id)formatter; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Demos/TestXcodeColors/Mobile/TextXcodeColors/TextXcodeColors-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.deusty.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2010-2014, Deusty, LLC 4 | All rights reserved. 5 | 6 | Redistribution and use of this software in source and binary forms, 7 | with or without modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above 10 | copyright notice, this list of conditions and the 11 | following disclaimer. 12 | 13 | * Neither the name of Deusty nor the names of its 14 | contributors may be used to endorse or promote products 15 | derived from this software without specific prior 16 | written permission of Deusty, LLC. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /Classes/DDAssertMacros.h: -------------------------------------------------------------------------------- 1 | // Software License Agreement (BSD License) 2 | // 3 | // Copyright (c) 2010-2014, Deusty, LLC 4 | // All rights reserved. 5 | // 6 | // Redistribution and use of this software in source and binary forms, 7 | // with or without modification, are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Neither the name of Deusty nor the names of its contributors may be used 13 | // to endorse or promote products derived from this software without specific 14 | // prior written permission of Deusty, LLC. 15 | 16 | #import "DDLogMacros.h" 17 | 18 | /** 19 | * NSAsset replacement that will output a log message even when assertions are disabled. 20 | **/ 21 | 22 | #define DDAssert(condition, frmt, ...) \ 23 | if (!(condition)) { \ 24 | NSString *description = [NSString stringWithFormat:frmt, ## __VA_ARGS__]; \ 25 | DDLogError(@"%@", description); \ 26 | NSAssert(NO, description); \ 27 | } 28 | 29 | #define DDAssertCondition(condition) DDAssert(condition, @"Condition not satisfied: %s", #condition) 30 | -------------------------------------------------------------------------------- /Demos/RegisteredDynamicLogging/Mobile/RegisteredLoggingTest/RegisteredLoggingTest-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.deusty.oss.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSRequiresIPhoneOS 28 | 29 | NSMainNibFile 30 | MainWindow 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Demos/CaptureASL/CaptureASL/CaptureASL-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | CocoaLumberjack.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Responses/HTTPRedirectResponse.m: -------------------------------------------------------------------------------- 1 | #import "HTTPRedirectResponse.h" 2 | #import "HTTPLogging.h" 3 | 4 | #if ! __has_feature(objc_arc) 5 | #warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC). 6 | #endif 7 | 8 | // Log levels : off, error, warn, info, verbose 9 | // Other flags: trace 10 | static const int httpLogLevel = HTTP_LOG_LEVEL_OFF; // | HTTP_LOG_FLAG_TRACE; 11 | 12 | 13 | @implementation HTTPRedirectResponse 14 | 15 | - (id)initWithPath:(NSString *)path 16 | { 17 | if ((self = [super init])) 18 | { 19 | HTTPLogTrace(); 20 | 21 | redirectPath = [path copy]; 22 | } 23 | return self; 24 | } 25 | 26 | - (UInt64)contentLength 27 | { 28 | return 0; 29 | } 30 | 31 | - (UInt64)offset 32 | { 33 | return 0; 34 | } 35 | 36 | - (void)setOffset:(UInt64)offset 37 | { 38 | // Nothing to do 39 | } 40 | 41 | - (NSData *)readDataOfLength:(NSUInteger)length 42 | { 43 | HTTPLogTrace(); 44 | 45 | return nil; 46 | } 47 | 48 | - (BOOL)isDone 49 | { 50 | return YES; 51 | } 52 | 53 | - (NSDictionary *)httpHeaders 54 | { 55 | HTTPLogTrace(); 56 | 57 | return [NSDictionary dictionaryWithObject:redirectPath forKey:@"Location"]; 58 | } 59 | 60 | - (NSInteger)status 61 | { 62 | HTTPLogTrace(); 63 | 64 | return 302; 65 | } 66 | 67 | - (void)dealloc 68 | { 69 | HTTPLogTrace(); 70 | 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Classes/DDLogMacros.h: -------------------------------------------------------------------------------- 1 | // Software License Agreement (BSD License) 2 | // 3 | // Copyright (c) 2010-2014, Deusty, LLC 4 | // All rights reserved. 5 | // 6 | // Redistribution and use of this software in source and binary forms, 7 | // with or without modification, are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Neither the name of Deusty nor the names of its contributors may be used 13 | // to endorse or promote products derived from this software without specific 14 | // prior written permission of Deusty, LLC. 15 | 16 | #import "DDLog.h" 17 | 18 | /** 19 | * Ready to use log macros. 20 | **/ 21 | 22 | #ifndef LOG_LEVEL_DEF 23 | #define LOG_LEVEL_DEF ddLogLevel 24 | #endif 25 | 26 | #define DDLogError(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_ERROR, LOG_LEVEL_DEF, LOG_FLAG_ERROR, 0, frmt, ## __VA_ARGS__) 27 | #define DDLogWarn(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_WARN, LOG_LEVEL_DEF, LOG_FLAG_WARN, 0, frmt, ## __VA_ARGS__) 28 | #define DDLogInfo(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_INFO, LOG_LEVEL_DEF, LOG_FLAG_INFO, 0, frmt, ## __VA_ARGS__) 29 | #define DDLogDebug(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_DEBUG, LOG_LEVEL_DEF, LOG_FLAG_DEBUG, 0, frmt, ## __VA_ARGS__) 30 | #define DDLogVerbose(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_VERBOSE, LOG_LEVEL_DEF, LOG_FLAG_VERBOSE, 0, frmt, ## __VA_ARGS__) 31 | -------------------------------------------------------------------------------- /Demos/Benchmark/Mobile/Classes/BenchmarkIPhoneViewController.m: -------------------------------------------------------------------------------- 1 | #import "BenchmarkIPhoneViewController.h" 2 | 3 | 4 | @implementation BenchmarkIPhoneViewController 5 | 6 | /* 7 | // The designated initializer. Override to perform setup that is required before the view is loaded. 8 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 9 | if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { 10 | // Custom initialization 11 | } 12 | return self; 13 | } 14 | */ 15 | 16 | /* 17 | // Implement loadView to create a view hierarchy programmatically, without using a nib. 18 | - (void)loadView { 19 | } 20 | */ 21 | 22 | 23 | /* 24 | // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. 25 | - (void)viewDidLoad { 26 | [super viewDidLoad]; 27 | } 28 | */ 29 | 30 | 31 | /* 32 | // Override to allow orientations other than the default portrait orientation. 33 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 34 | // Return YES for supported orientations 35 | return (interfaceOrientation == UIInterfaceOrientationPortrait); 36 | } 37 | */ 38 | 39 | - (void)didReceiveMemoryWarning { 40 | // Releases the view if it doesn't have a superview. 41 | [super didReceiveMemoryWarning]; 42 | 43 | // Release any cached data, images, etc that aren't in use. 44 | } 45 | 46 | - (void)viewDidUnload { 47 | // Release any retained subviews of the main view. 48 | // e.g. self.myOutlet = nil; 49 | } 50 | 51 | 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Classes/CLI/CLIColor.m: -------------------------------------------------------------------------------- 1 | // Software License Agreement (BSD License) 2 | // 3 | // Copyright (c) 2010-2014, Deusty, LLC 4 | // All rights reserved. 5 | // 6 | // Redistribution and use of this software in source and binary forms, 7 | // with or without modification, are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Neither the name of Deusty nor the names of its contributors may be used 13 | // to endorse or promote products derived from this software without specific 14 | // prior written permission of Deusty, LLC. 15 | 16 | #import "CLIColor.h" 17 | 18 | @interface CLIColor () { 19 | CGFloat _red, _green, _blue, _alpha; 20 | } 21 | 22 | @end 23 | 24 | 25 | @implementation CLIColor 26 | 27 | + (CLIColor *)colorWithCalibratedRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha { 28 | CLIColor *color = [CLIColor new]; 29 | 30 | color->_red = red; 31 | color->_green = green; 32 | color->_blue = blue; 33 | color->_alpha = alpha; 34 | return color; 35 | } 36 | 37 | - (void)getRed:(CGFloat *)red green:(CGFloat *)green blue:(CGFloat *)blue alpha:(CGFloat *)alpha { 38 | if (red) { 39 | *red = _red; 40 | } 41 | 42 | if (green) { 43 | *green = _green; 44 | } 45 | 46 | if (blue) { 47 | *blue = _blue; 48 | } 49 | 50 | if (alpha) { 51 | *alpha = _alpha; 52 | } 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Documentation/FAQ.md: -------------------------------------------------------------------------------- 1 | Frequently asked questions. 2 | 3 | # Questions 4 | 5 | ### How can it be faster than NSLog when only outputting to the console? 6 | 7 | > This simple answer is that NSLog is just slow. But the more technical answer involves the Apple System Logging (asl) facility, and the fact that the Lumberjack framework is able to reuse a single asl client connection, as opposed to opening and closing one for every single log message. 8 | 9 | > For a more detailed explanation see the section entitled "A Better NSLog" in the [[performance page | Performance]]. 10 | 11 | ### Does Lumberjack require Grand Central Dispatch? 12 | 13 | > No. In fact one of the original requirements was that the framework must support iPhone 3.X which doesn't include GCD. 14 | 15 | > And the performance of the framework without GCD is still excellent. See the [[performance | Performance]] page for a benchmark of the framework running on iPhone 3.1.3 on an iPhone 3GS. 16 | 17 | ### Where should I initialize/configure the lumberjack framework? 18 | 19 | > The simple answer is that you should initialize the framework before you first use it. Since logging is one of those "set it and forget it" tasks, it is usually best if you do so first thing when your application launches. In most cases this means in your applicationDidFinishLaunching method. However, you may need to do so even earlier if you have custom code in init or awakeFromNib methods that executes before the application has finished launching. 20 | 21 | > For information on configuring the logging framework, see the [[getting started | GettingStarted]] page. 22 | -------------------------------------------------------------------------------- /Demos/PerUserLogLevels/PerUserLogLevels/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import 3 | 4 | // The LumberjackUser header file is automatically generated by the LumberjackUser.bash script. 5 | // This script has been added as a build phase to the target. 6 | // The script gets executed before the files are compiled. 7 | // 8 | // When you compile it on your system, it will replace the line: 9 | // "#define robbie_hanson 1" 10 | // with 11 | // "#define your_name 1" 12 | // 13 | // This makes it easier to manage debug log levels while working in a team. 14 | // After all, everyone is working on different parts of the app. 15 | // So now everyone can just checkin their log levels, without affecting the debug output of others. 16 | #import "LumberjackUser.h" 17 | 18 | 19 | // Log levels: off, error, warn, info, verbose 20 | #if DEBUG && robbie_hanson 21 | static const int ddLogLevel = LOG_LEVEL_VERBOSE; // Log level for robbie (debug) 22 | #elif DEBUG 23 | static const int ddLogLevel = LOG_LEVEL_INFO; // Log level for other team members (debug) 24 | #else 25 | static const int ddLogLevel = LOG_LEVEL_WARN; // Log level for release build 26 | #endif 27 | 28 | 29 | @implementation AppDelegate 30 | 31 | @synthesize window = _window; 32 | 33 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 34 | { 35 | [DDLog addLogger:[DDTTYLogger sharedInstance]]; 36 | 37 | DDLogVerbose(@"Invoking machine_init_cold"); 38 | DDLogInfo(@"Waiting for machine to warm up..."); 39 | DDLogWarn(@"Toner is low"); 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Classes/DDASLLogger.h: -------------------------------------------------------------------------------- 1 | // Software License Agreement (BSD License) 2 | // 3 | // Copyright (c) 2010-2014, Deusty, LLC 4 | // All rights reserved. 5 | // 6 | // Redistribution and use of this software in source and binary forms, 7 | // with or without modification, are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Neither the name of Deusty nor the names of its contributors may be used 13 | // to endorse or promote products derived from this software without specific 14 | // prior written permission of Deusty, LLC. 15 | 16 | #import 17 | #import "DDLog.h" 18 | 19 | /** 20 | * This class provides a logger for the Apple System Log facility. 21 | * 22 | * As described in the "Getting Started" page, 23 | * the traditional NSLog() function directs it's output to two places: 24 | * 25 | * - Apple System Log 26 | * - StdErr (if stderr is a TTY) so log statements show up in Xcode console 27 | * 28 | * To duplicate NSLog() functionality you can simply add this logger and a tty logger. 29 | * However, if you instead choose to use file logging (for faster performance), 30 | * you may choose to use a file logger and a tty logger. 31 | **/ 32 | 33 | @interface DDASLLogger : DDAbstractLogger 34 | 35 | + (instancetype)sharedInstance; 36 | 37 | // Inherited from DDAbstractLogger 38 | 39 | // - (id )logFormatter; 40 | // - (void)setLogFormatter:(id )formatter; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Demos/FineGrainedLogging/TimerOne.m: -------------------------------------------------------------------------------- 1 | #import "TimerOne.h" 2 | #import "MYLog.h" 3 | 4 | // Debug levels: off, error, warn, info, verbose 5 | static const int ddLogLevel = LOG_LEVEL_VERBOSE | LOG_FLAG_TIMERS; 6 | 7 | 8 | @implementation TimerOne 9 | 10 | - (id)init 11 | { 12 | if ((self = [super init])) 13 | { 14 | DDLogVerbose(@"TimerOne: Creating timers..."); 15 | 16 | foodTimer = [NSTimer scheduledTimerWithTimeInterval:2.0 17 | target:self 18 | selector:@selector(foodTimerDidFire:) 19 | userInfo:nil 20 | repeats:YES]; 21 | 22 | sleepTimer = [NSTimer scheduledTimerWithTimeInterval:6.0 23 | target:self 24 | selector:@selector(sleepTimerDidFire:) 25 | userInfo:nil 26 | repeats:YES]; 27 | } 28 | return self; 29 | } 30 | 31 | - (void)foodTimerDidFire:(NSTimer *)aTimer 32 | { 33 | DDLogFoodTimer(@"TimerOne: Hungry - Need Food"); 34 | } 35 | 36 | - (void)sleepTimerDidFire:(NSTimer *)aTimer 37 | { 38 | DDLogSleepTimer(@"TimerOne: Tired - Need Sleep"); 39 | } 40 | 41 | - (void)dealloc 42 | { 43 | DDLogVerbose(@"TimerOne: dealloc"); 44 | 45 | [foodTimer invalidate]; 46 | 47 | [sleepTimer invalidate]; 48 | 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Demos/FineGrainedLogging/TimerTwo.m: -------------------------------------------------------------------------------- 1 | #import "TimerTwo.h" 2 | #import "MYLog.h" 3 | 4 | // Debug levels: off, error, warn, info, verbose 5 | static const int ddLogLevel = LOG_LEVEL_VERBOSE | LOG_FLAG_TIMERS; 6 | 7 | 8 | @implementation TimerTwo 9 | 10 | - (id)init 11 | { 12 | if ((self = [super init])) 13 | { 14 | DDLogVerbose(@"TimerTwo: Creating timers..."); 15 | 16 | foodTimer = [NSTimer scheduledTimerWithTimeInterval:10.0 17 | target:self 18 | selector:@selector(foodTimerDidFire:) 19 | userInfo:nil 20 | repeats:YES]; 21 | 22 | sleepTimer = [NSTimer scheduledTimerWithTimeInterval:30.0 23 | target:self 24 | selector:@selector(sleepTimerDidFire:) 25 | userInfo:nil 26 | repeats:YES]; 27 | } 28 | return self; 29 | } 30 | 31 | - (void)foodTimerDidFire:(NSTimer *)aTimer 32 | { 33 | DDLogFoodTimer(@"TimerTwo: Hungry - Need Food"); 34 | } 35 | 36 | - (void)sleepTimerDidFire:(NSTimer *)aTimer 37 | { 38 | DDLogSleepTimer(@"TimerTwo: Tired - Need Sleep"); 39 | } 40 | 41 | - (void)dealloc 42 | { 43 | DDLogVerbose(@"TimerTwo: dealloc"); 44 | 45 | [foodTimer invalidate]; 46 | 47 | [sleepTimer invalidate]; 48 | 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/CoreDataLogger.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | 5 | @interface CoreDataLogger : DDAbstractDatabaseLogger 6 | { 7 | @private 8 | NSString *logDirectory; 9 | 10 | NSManagedObjectModel *managedObjectModel; 11 | NSPersistentStoreCoordinator *persistentStoreCoordinator; 12 | NSManagedObjectContext *managedObjectContext; 13 | NSEntityDescription *logEntryEntity; 14 | } 15 | 16 | /** 17 | * Initializes an instance set to save it's CocoaBotLog.sqlite file to the given directory. 18 | * If the directory doesn't already exist, it is automatically created. 19 | **/ 20 | - (id)initWithLogDirectory:(NSString *)logDirectory; 21 | 22 | /** 23 | * Provides access to the thread-safe components of the core data stack. 24 | * 25 | * Please note that NSManagedObjectContext is NOT thread-safe. 26 | * The managedObjectContext in use by this instance is only to be used on it's private dispatch_queue. 27 | * You must create your own managedObjectContext for your own use. 28 | **/ 29 | @property (strong, readonly) NSManagedObjectModel *managedObjectModel; 30 | @property (strong, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator; 31 | 32 | /** 33 | * Clears the log by removing the persistentStore from the persistentStoreCoordinator, 34 | * and deleting the Log.sqlite file from disk. 35 | * 36 | * Important: If you have created your own managedObjectContext for the Log, 37 | * you MUST reset your context following an invocation of this method! 38 | **/ 39 | - (void)clearLog; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Demos/ContextFilter/ThirdPartyFramework.m: -------------------------------------------------------------------------------- 1 | #import "ThirdPartyFramework.h" 2 | #import 3 | 4 | // Third party frameworks and libraries should define their own custom log definitions. 5 | // These should use a custom context to allow those who use the framework 6 | // the ability to maintain fine grained control of their logging experience. 7 | // 8 | // The custom context is defined in the header file: 9 | // 10 | // #define TP_LOG_CONTEXT 1044 11 | 12 | #define TP_LOG_ERROR (tpLogLevel & LOG_FLAG_ERROR) 13 | #define TP_LOG_WARN (tpLogLevel & LOG_FLAG_WARN) 14 | #define TP_LOG_INFO (tpLogLevel & LOG_FLAG_INFO) 15 | #define TP_LOG_VERBOSE (tpLogLevel & LOG_FLAG_VERBOSE) 16 | 17 | #define TPLogError(frmt, ...) SYNC_LOG_OBJC_MAYBE(tpLogLevel, LOG_FLAG_ERROR, TP_LOG_CONTEXT, frmt, ##__VA_ARGS__) 18 | #define TPLogWarn(frmt, ...) ASYNC_LOG_OBJC_MAYBE(tpLogLevel, LOG_FLAG_WARN, TP_LOG_CONTEXT, frmt, ##__VA_ARGS__) 19 | #define TPLogInfo(frmt, ...) ASYNC_LOG_OBJC_MAYBE(tpLogLevel, LOG_FLAG_INFO, TP_LOG_CONTEXT, frmt, ##__VA_ARGS__) 20 | #define TPLogVerbose(frmt, ...) ASYNC_LOG_OBJC_MAYBE(tpLogLevel, LOG_FLAG_VERBOSE, TP_LOG_CONTEXT, frmt, ##__VA_ARGS__) 21 | 22 | // Log levels: off, error, warn, info, verbose 23 | static const int tpLogLevel = LOG_LEVEL_VERBOSE; 24 | 25 | 26 | @implementation ThirdPartyFramework 27 | 28 | + (void)start 29 | { 30 | [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(fire:) userInfo:nil repeats:YES]; 31 | } 32 | 33 | + (void)fire:(NSTimer *)timer 34 | { 35 | TPLogVerbose(@"Log message from third party framework"); 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/Formatter.m: -------------------------------------------------------------------------------- 1 | #import "Formatter.h" 2 | 3 | @interface Formatter () 4 | 5 | @property (nonatomic, strong) NSDateFormatter *threadUnsafeDateFormatter; // for date/time formatting 6 | 7 | @end 8 | 9 | 10 | @implementation Formatter 11 | 12 | - (id)init { 13 | if (self = [super init]) { 14 | _threadUnsafeDateFormatter = [[NSDateFormatter alloc] init]; 15 | [_threadUnsafeDateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4]; 16 | [_threadUnsafeDateFormatter setDateFormat:@"HH:mm:ss.SSS"]; 17 | } 18 | 19 | return self; 20 | } 21 | 22 | - (NSString *)formatLogMessage:(DDLogMessage *)logMessage { 23 | NSString *dateAndTime = [self.threadUnsafeDateFormatter stringFromDate:(logMessage->timestamp)]; 24 | 25 | NSString *logLevel = nil; 26 | switch (logMessage->logFlag) { 27 | case DDLogFlagError : logLevel = @"E"; break; 28 | case DDLogFlagWarning : logLevel = @"W"; break; 29 | case DDLogFlagInfo : logLevel = @"I"; break; 30 | case DDLogFlagDebug : logLevel = @"D"; break; 31 | case DDLogFlagVerbose : logLevel = @"V"; break; 32 | default : logLevel = @"?"; break; 33 | } 34 | 35 | NSString *formattedLog = [NSString stringWithFormat:@"%@ |%@| [%@ %@] #%d: %@", 36 | dateAndTime, 37 | logLevel, 38 | logMessage.fileName, 39 | logMessage.methodName, 40 | logMessage->lineNumber, 41 | logMessage->logMsg]; 42 | 43 | return formattedLog; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Demos/LogFileCompressor/LogFileCompressorAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "LogFileCompressorAppDelegate.h" 2 | 3 | #import 4 | #import "CompressingLogFileManager.h" 5 | 6 | // Debug levels: off, error, warn, info, verbose 7 | static const int ddLogLevel = LOG_LEVEL_VERBOSE; 8 | 9 | 10 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 11 | #pragma mark - 12 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 13 | 14 | @implementation LogFileCompressorAppDelegate 15 | 16 | @synthesize window; 17 | 18 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 19 | { 20 | CompressingLogFileManager *logFileManager = [[CompressingLogFileManager alloc] init]; 21 | 22 | fileLogger = [[DDFileLogger alloc] initWithLogFileManager:logFileManager]; 23 | 24 | fileLogger.maximumFileSize = 1024 * 1; // 1 KB 25 | fileLogger.rollingFrequency = 60 * 1; // 1 Minute 26 | 27 | fileLogger.logFileManager.maximumNumberOfLogFiles = 4; 28 | 29 | [DDLog addLogger:[DDASLLogger sharedInstance]]; 30 | [DDLog addLogger:[DDTTYLogger sharedInstance]]; 31 | [DDLog addLogger:fileLogger]; 32 | 33 | [NSTimer scheduledTimerWithTimeInterval:1.0 34 | target:self 35 | selector:@selector(writeLogMessages:) 36 | userInfo:nil 37 | repeats:YES]; 38 | } 39 | 40 | - (void)writeLogMessages:(NSTimer *)aTimer 41 | { 42 | DDLogVerbose(@"I like cheese"); 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Demos/PerUserLogLevels/Scripts/LumberjackUser.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Get full user name of current user 4 | # E.g. "Robbie Hanson" 5 | full1=$(osascript -e "tell application \"System Events\"" -e "get the full name of the current user" -e "end tell") 6 | #echo $full1 7 | 8 | # Convert to lower case 9 | # E.g. "robbie hanson" 10 | full2=$(echo $full1 | awk '{print tolower($0)}') 11 | #echo $full2 12 | 13 | # Replace spaces with underscores 14 | # E.g. "robbie_hanson" 15 | full3=$(echo ${full2// /_}) 16 | #echo $full3 17 | 18 | # Remove any characters that are illegal in a macro name 19 | full4=$(echo $full3 | sed 's/[^0-9a-zA-Z_]*//g') 20 | #echo $full4 21 | 22 | # If blank, set the name to an anonymous user 23 | if [ "$full4" == "" ] 24 | then 25 | full4='anonymous_user' 26 | fi 27 | 28 | # If we output directly to our intended file, even when nothing has changed, 29 | # then we'll essentially be doing a touch on the file. 30 | # The compiler will see this, and recompile any files that include the header. 31 | # This may mean recompiling every single source file, every single time we do a build! 32 | # So instead we're going to output to a temporary file, and use diff to detect changes. 33 | 34 | temp_filepath="${SRCROOT}/PerUserLogLevels/LumberjackUser.temp.h" 35 | final_filepath="${SRCROOT}/PerUserLogLevels/LumberjackUser.h" 36 | 37 | echo "// This file is automatically generated" > ${temp_filepath} 38 | echo "#define $full4 1" >> ${temp_filepath} 39 | 40 | if [ -a ${final_filepath} ] 41 | then 42 | DIFF=$(diff ${temp_filepath} ${final_filepath}) 43 | if [ "$DIFF" != "" ] 44 | then 45 | cp -f ${temp_filepath} ${final_filepath} 46 | fi 47 | else 48 | cp -f ${temp_filepath} ${final_filepath} 49 | fi -------------------------------------------------------------------------------- /Demos/UniversalApp/Classes/UniversalAppViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UniversalAppViewController.m 3 | // UniversalApp 4 | // 5 | // Created by Robbie Hanson on 7/1/10. 6 | // 7 | 8 | #import "UniversalAppViewController.h" 9 | 10 | @implementation UniversalAppViewController 11 | 12 | 13 | 14 | /* 15 | // The designated initializer. Override to perform setup that is required before the view is loaded. 16 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 17 | if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { 18 | // Custom initialization 19 | } 20 | return self; 21 | } 22 | */ 23 | 24 | /* 25 | // Implement loadView to create a view hierarchy programmatically, without using a nib. 26 | - (void)loadView { 27 | } 28 | */ 29 | 30 | 31 | /* 32 | // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. 33 | - (void)viewDidLoad { 34 | [super viewDidLoad]; 35 | } 36 | */ 37 | 38 | 39 | /* 40 | // Override to allow orientations other than the default portrait orientation. 41 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 42 | // Return YES for supported orientations 43 | return (interfaceOrientation == UIInterfaceOrientationPortrait); 44 | } 45 | */ 46 | 47 | - (void)didReceiveMemoryWarning { 48 | // Releases the view if it doesn't have a superview. 49 | [super didReceiveMemoryWarning]; 50 | 51 | // Release any cached data, images, etc that aren't in use. 52 | } 53 | 54 | - (void)viewDidUnload { 55 | // Release any retained subviews of the main view. 56 | // e.g. self.myOutlet = nil; 57 | } 58 | 59 | 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This Xcode project demonstrates "live remote logging" in an iPhone application. Imagine you are testing your application on several different devices. Perhaps you're testing some networking code (where multiple devices communicate). Or perhaps you're testing scenarios that require the device to be disconnected from power. Irregardless of the circumstances, you'd like to see the application's log console in real time, while the application is running, but when the device is not directly connected to your machine. This project accomplishes this goal. Using a web browser, you can connect to the device, and view the log in real time as your application is running. 2 | 3 | It works by using an embedded HTTP server. Thankfully, we didn't have to write our own embedded HTTP server. There is a mature open source implementation which provides a slim yet powerful and flexible server: 4 | http://code.google.com/p/cocoahttpserver/ 5 | 6 | This server also supports optional features such as secure connections (SSL/TLS) and password protection (secure digest access). 7 | 8 | When you connect to the embedded HTTP server running within the application, it adds a new logger to the logging framework. This logger will output the log messages to your browser. 9 | 10 | There are a couple different HTTP techniques that could be used to implement such a thing. We chose to use WebSockets because it was easy, and because it is one of the most efficient ways to accomplish the task. Unfortunately WebSockets are not currently supported by all browsers (at the time of this writing). If WebSockets are not supported, the page should report this problem to you. Google Chrome is known to work right now. 11 | 12 | -------------------------------------------------------------------------------- /CocoaLumberjack.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'CocoaLumberjack' 3 | s.version = '2.0.0-beta3' 4 | s.license = 'BSD' 5 | s.summary = 'A fast & simple, yet powerful & flexible logging framework for Mac and iOS.' 6 | s.homepage = 'https://github.com/CocoaLumberjack/CocoaLumberjack' 7 | s.author = { 'Robbie Hanson' => 'robbiehanson@deusty.com' } 8 | s.source = { :git => 'https://github.com/CocoaLumberjack/CocoaLumberjack.git', 9 | :tag => "#{s.version}" } 10 | 11 | s.description = 'It is similar in concept to other popular logging frameworks such as log4j, ' \ 12 | 'yet is designed specifically for objective-c, and takes advantage of features ' \ 13 | 'such as multi-threading, grand central dispatch (if available), lockless ' \ 14 | 'atomic operations, and the dynamic nature of the objective-c runtime.' 15 | 16 | s.requires_arc = true 17 | 18 | s.preserve_paths = 'README*' 19 | s.ios.deployment_target = '5.0' 20 | s.osx.deployment_target = '10.7' 21 | 22 | s.public_header_files = 'Classes/*.h' 23 | 24 | s.default_subspecs = 'Default', 'Extensions' 25 | 26 | s.subspec 'Default' do |ss| 27 | ss.source_files = 'Classes/CocoaLumberjack.{h,m}' 28 | ss.dependency 'CocoaLumberjack/Core' 29 | end 30 | 31 | s.subspec 'Core' do |ss| 32 | ss.source_files = 'Classes/DD*.{h,m}' 33 | end 34 | 35 | s.subspec 'Extensions' do |ss| 36 | ss.source_files = 'Classes/Extensions/*.{h,m}' 37 | ss.dependency 'CocoaLumberjack/Default' 38 | end 39 | 40 | s.subspec 'CLI' do |ss| 41 | ss.source_files = 'Classes/CLI/*.{h,m}' 42 | ss.dependency 'CocoaLumberjack/Default' 43 | end 44 | 45 | end 46 | -------------------------------------------------------------------------------- /Documentation/README.md: -------------------------------------------------------------------------------- 1 | 2 | CocoaLumberjack Documentation 3 | ============================= 4 | 5 | ## Beginner 6 | 7 | * [Getting Started](GettingStarted.md): Get up and running using the Lumberjack Framework. 8 | 9 | * [ARC](ARC.md): Supporting ARC files in a non-ARC project. 10 | 11 | * [Xcode Tricks](XcodeTricks.md): Using different log levels for Debug and Release builds. 12 | 13 | * [Per Logger Log Levels](PerLoggerLogLevels.md): Using different log levels for each logger. 14 | 15 | * [Xcode Colors](XcodeColors.md): Use colors in the Xcode debugging console. 16 | 17 | * [Custom Formatters](CustomFormatters.md): How to write your own custom formatters. 18 | 19 | * [FAQ](FAQ.md): Frequently asked questions. 20 | 21 | * [Performance](Performance.md): Analysis of performance with benchmarks. 22 | 23 | * [Problem Solution](ProblemSolution.md): Common issues you may encounter and their solutions. 24 | 25 | * [AppCode Support](AppCode-support.md) How to use CocoaLumberjack in AppCode. 26 | 27 | ## Intermediate 28 | 29 | * [Architecture](Architecture.md): Lumberjack internals & overview. 30 | 31 | * [Custom Context](CustomContext.md): Taking advantage of logging contexts. 32 | 33 | * [Custom Loggers](CustomLoggers.md): How to write your own custom loggers. 34 | 35 | * [Custom Log Levels](CustomLogLevels.md): How to add or customize log levels. 36 | 37 | * [Per User Log Levels](PerUserLogLevels.md): Different log levels per developer. 38 | 39 | ## Advanced 40 | 41 | * [Dynamic Log Levels](DynamicLogLevels.md): Dynamically changing log levels during run-time. 42 | 43 | * [Fine Grained Logging](FineGrainedLogging.md): When you need something more advanced than simple log levels. 44 | 45 | * [Log File Management](LogFileManagement.md): Compress your log files, or upload them to a server. 46 | 47 | -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/LibTest-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.deusty.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main_iPhone 29 | UIMainStoryboardFile~ipad 30 | Main_iPad 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Demos/RollingTestMac/RollingTestMacAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "RollingTestMacAppDelegate.h" 2 | 3 | #import 4 | 5 | // Debug levels: off, error, warn, info, verbose 6 | static const int ddLogLevel = LOG_LEVEL_VERBOSE; 7 | 8 | 9 | @implementation RollingTestMacAppDelegate 10 | 11 | @synthesize window; 12 | 13 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 14 | { 15 | fileLogger = [[DDFileLogger alloc] init]; 16 | 17 | fileLogger.maximumFileSize = 1024 * 1; // 1 KB 18 | fileLogger.rollingFrequency = 60; // 60 Seconds 19 | 20 | fileLogger.logFileManager.maximumNumberOfLogFiles = 4; 21 | 22 | [DDLog addLogger:fileLogger]; 23 | 24 | // Test auto log file roll 25 | 26 | [NSTimer scheduledTimerWithTimeInterval:1.0 27 | target:self 28 | selector:@selector(fillLogFiles:) 29 | userInfo:nil 30 | repeats:YES]; 31 | 32 | // Test forced log file roll 33 | 34 | // DDLogInfo(@"Log file 1 : Log message 1"); 35 | // DDLogInfo(@"Log file 1 : Log message 2"); 36 | // DDLogInfo(@"Log file 1 : Log message 3"); 37 | // 38 | // [fileLogger rollLogFile]; 39 | // 40 | // DDLogInfo(@"Log file 2 : Log message 1"); 41 | // DDLogInfo(@"Log file 2 : Log message 2"); 42 | // DDLogInfo(@"Log file 2 : Log message 3"); 43 | } 44 | 45 | - (void)fillLogFiles:(NSTimer *)aTimer 46 | { 47 | int max = 1; 48 | 49 | // To test rolling log files due to age, set max to 1 50 | // To test rolling log files due to size, set max to 10 51 | 52 | for (int i = 0; i < max; i++) 53 | { 54 | DDLogInfo(@"I like cheese"); 55 | } 56 | 57 | NSLog(@"Inc"); 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Demos/SQLiteLogger/SQLiteLogger/SQLiteLoggerAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "SQLiteLoggerAppDelegate.h" 2 | #import 3 | #import "FMDBLogger.h" 4 | 5 | // Log levels: off, error, warn, info, verbose 6 | static const int ddLogLevel = LOG_LEVEL_VERBOSE; 7 | 8 | 9 | @implementation SQLiteLoggerAppDelegate 10 | 11 | @synthesize window; 12 | 13 | - (NSString *)applicationFilesDirectory 14 | { 15 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES); 16 | NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : NSTemporaryDirectory(); 17 | 18 | return [basePath stringByAppendingPathComponent:@"SQLiteLogger"]; 19 | } 20 | 21 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 22 | { 23 | // [DDLog addLogger:[DDTTYLogger sharedInstance]]; 24 | 25 | sqliteLogger = [[FMDBLogger alloc] initWithLogDirectory:[self applicationFilesDirectory]]; 26 | 27 | sqliteLogger.saveThreshold = 500; 28 | sqliteLogger.saveInterval = 60; // 60 seconds 29 | sqliteLogger.maxAge = 60 * 60 * 24 * 7; // 7 days 30 | sqliteLogger.deleteInterval = 60 * 5; // 5 minutes 31 | sqliteLogger.deleteOnEverySave = NO; 32 | 33 | [DDLog addLogger:sqliteLogger]; 34 | 35 | [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(doTest:) userInfo:nil repeats:NO]; 36 | } 37 | 38 | - (void)doTest:(NSTimer *)aTimer 39 | { 40 | NSDate *start = [NSDate date]; 41 | 42 | int i; 43 | for (i = 0; i < 1000; i++) 44 | { 45 | DDLogVerbose(@"A log message of average size"); 46 | } 47 | [DDLog flushLog]; 48 | 49 | NSTimeInterval elapsed = [start timeIntervalSinceNow] * -1.0; 50 | NSLog(@"Total time: %.4f", elapsed); 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Demos/CoreDataLogger/CoreDataLogger/CoreDataLoggerAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "CoreDataLoggerAppDelegate.h" 2 | #import 3 | #import "CoreDataLogger.h" 4 | 5 | // Log levels: off, error, warn, info, verbose 6 | static const int ddLogLevel = LOG_LEVEL_VERBOSE; 7 | 8 | 9 | @implementation CoreDataLoggerAppDelegate 10 | 11 | @synthesize window; 12 | 13 | - (NSString *)applicationFilesDirectory 14 | { 15 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES); 16 | NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : NSTemporaryDirectory(); 17 | 18 | return [basePath stringByAppendingPathComponent:@"CoreDataLogger"]; 19 | } 20 | 21 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 22 | { 23 | // [DDLog addLogger:[DDTTYLogger sharedInstance]]; 24 | 25 | coreDataLogger = [[CoreDataLogger alloc] initWithLogDirectory:[self applicationFilesDirectory]]; 26 | 27 | coreDataLogger.saveThreshold = 500; 28 | coreDataLogger.saveInterval = 60; // 60 seconds 29 | coreDataLogger.maxAge = 60 * 60 * 24 * 7; // 7 days 30 | coreDataLogger.deleteInterval = 60 * 5; // 5 minutes 31 | coreDataLogger.deleteOnEverySave = NO; 32 | 33 | [DDLog addLogger:coreDataLogger]; 34 | 35 | [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(doTest:) userInfo:nil repeats:NO]; 36 | } 37 | 38 | - (void)doTest:(NSTimer *)aTimer 39 | { 40 | NSDate *start = [NSDate date]; 41 | 42 | int i; 43 | for (i = 0; i < 1000; i++) 44 | { 45 | DDLogVerbose(@"A log message of average size"); 46 | } 47 | [DDLog flushLog]; 48 | 49 | NSTimeInterval elapsed = [start timeIntervalSinceNow] * -1.0; 50 | NSLog(@"Total time: %.4f", elapsed); 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Responses/HTTPDynamicFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "HTTPResponse.h" 3 | #import "HTTPAsyncFileResponse.h" 4 | 5 | /** 6 | * This class is designed to assist with dynamic content. 7 | * Imagine you have a file that you want to make dynamic: 8 | * 9 | * 10 | * 11 | *

ComputerName Control Panel

12 | * ... 13 | *
  • System Time: SysTime
  • 14 | * 15 | * 16 | * 17 | * Now you could generate the entire file in Objective-C, 18 | * but this would be a horribly tedious process. 19 | * Beside, you want to design the file with professional tools to make it look pretty. 20 | * 21 | * So all you have to do is escape your dynamic content like this: 22 | * 23 | * ... 24 | *

    %%ComputerName%% Control Panel

    25 | * ... 26 | *
  • System Time: %%SysTime%%
  • 27 | * 28 | * And then you create an instance of this class with: 29 | * 30 | * - separator = @"%%" 31 | * - replacementDictionary = { "ComputerName"="Black MacBook", "SysTime"="2010-04-30 03:18:24" } 32 | * 33 | * This class will then perform the replacements for you, on the fly, as it reads the file data. 34 | * This class is also asynchronous, so it will perform the file IO using its own GCD queue. 35 | * 36 | * All keys for the replacementDictionary must be NSString's. 37 | * Values for the replacementDictionary may be NSString's, or any object that 38 | * returns what you want when its description method is invoked. 39 | **/ 40 | 41 | @interface HTTPDynamicFileResponse : HTTPAsyncFileResponse 42 | { 43 | NSData *separator; 44 | NSDictionary *replacementDict; 45 | } 46 | 47 | - (id)initWithFilePath:(NSString *)filePath 48 | forConnection:(HTTPConnection *)connection 49 | separator:(NSString *)separatorStr 50 | replacementDictionary:(NSDictionary *)dictionary; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Categories/DDRange.h: -------------------------------------------------------------------------------- 1 | /** 2 | * DDRange is the functional equivalent of a 64 bit NSRange. 3 | * The HTTP Server is designed to support very large files. 4 | * On 32 bit architectures (ppc, i386) NSRange uses unsigned 32 bit integers. 5 | * This only supports a range of up to 4 gigabytes. 6 | * By defining our own variant, we can support a range up to 16 exabytes. 7 | * 8 | * All effort is given such that DDRange functions EXACTLY the same as NSRange. 9 | **/ 10 | 11 | #import 12 | #import 13 | 14 | @class NSString; 15 | 16 | typedef struct _DDRange { 17 | UInt64 location; 18 | UInt64 length; 19 | } DDRange; 20 | 21 | typedef DDRange *DDRangePointer; 22 | 23 | NS_INLINE DDRange DDMakeRange(UInt64 loc, UInt64 len) { 24 | DDRange r; 25 | r.location = loc; 26 | r.length = len; 27 | return r; 28 | } 29 | 30 | NS_INLINE UInt64 DDMaxRange(DDRange range) { 31 | return (range.location + range.length); 32 | } 33 | 34 | NS_INLINE BOOL DDLocationInRange(UInt64 loc, DDRange range) { 35 | return (loc - range.location < range.length); 36 | } 37 | 38 | NS_INLINE BOOL DDEqualRanges(DDRange range1, DDRange range2) { 39 | return ((range1.location == range2.location) && (range1.length == range2.length)); 40 | } 41 | 42 | FOUNDATION_EXPORT DDRange DDUnionRange(DDRange range1, DDRange range2); 43 | FOUNDATION_EXPORT DDRange DDIntersectionRange(DDRange range1, DDRange range2); 44 | FOUNDATION_EXPORT NSString *DDStringFromRange(DDRange range); 45 | FOUNDATION_EXPORT DDRange DDRangeFromString(NSString *aString); 46 | 47 | NSInteger DDRangeCompare(DDRangePointer pDDRange1, DDRangePointer pDDRange2); 48 | 49 | @interface NSValue (NSValueDDRangeExtensions) 50 | 51 | + (NSValue *)valueWithDDRange:(DDRange)range; 52 | - (DDRange)ddrangeValue; 53 | 54 | - (NSInteger)ddrangeCompare:(NSValue *)ddrangeValue; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/Base.lproj/Main_iPad.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Framework/Mobile/LibTest/Base.lproj/Main_iPhone.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Categories/DDNumber.m: -------------------------------------------------------------------------------- 1 | #import "DDNumber.h" 2 | 3 | 4 | @implementation NSNumber (DDNumber) 5 | 6 | + (BOOL)parseString:(NSString *)str intoSInt64:(SInt64 *)pNum 7 | { 8 | if(str == nil) 9 | { 10 | *pNum = 0; 11 | return NO; 12 | } 13 | 14 | errno = 0; 15 | 16 | // On both 32-bit and 64-bit machines, long long = 64 bit 17 | 18 | *pNum = strtoll([str UTF8String], NULL, 10); 19 | 20 | if(errno != 0) 21 | return NO; 22 | else 23 | return YES; 24 | } 25 | 26 | + (BOOL)parseString:(NSString *)str intoUInt64:(UInt64 *)pNum 27 | { 28 | if(str == nil) 29 | { 30 | *pNum = 0; 31 | return NO; 32 | } 33 | 34 | errno = 0; 35 | 36 | // On both 32-bit and 64-bit machines, unsigned long long = 64 bit 37 | 38 | *pNum = strtoull([str UTF8String], NULL, 10); 39 | 40 | if(errno != 0) 41 | return NO; 42 | else 43 | return YES; 44 | } 45 | 46 | + (BOOL)parseString:(NSString *)str intoNSInteger:(NSInteger *)pNum 47 | { 48 | if(str == nil) 49 | { 50 | *pNum = 0; 51 | return NO; 52 | } 53 | 54 | errno = 0; 55 | 56 | // On LP64, NSInteger = long = 64 bit 57 | // Otherwise, NSInteger = int = long = 32 bit 58 | 59 | *pNum = strtol([str UTF8String], NULL, 10); 60 | 61 | if(errno != 0) 62 | return NO; 63 | else 64 | return YES; 65 | } 66 | 67 | + (BOOL)parseString:(NSString *)str intoNSUInteger:(NSUInteger *)pNum 68 | { 69 | if(str == nil) 70 | { 71 | *pNum = 0; 72 | return NO; 73 | } 74 | 75 | errno = 0; 76 | 77 | // On LP64, NSUInteger = unsigned long = 64 bit 78 | // Otherwise, NSUInteger = unsigned int = unsigned long = 32 bit 79 | 80 | *pNum = strtoul([str UTF8String], NULL, 10); 81 | 82 | if(errno != 0) 83 | return NO; 84 | else 85 | return YES; 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Demos/WebServerIPhone/Vendor/CocoaHTTPServer/Responses/HTTPDataResponse.m: -------------------------------------------------------------------------------- 1 | #import "HTTPDataResponse.h" 2 | #import "HTTPLogging.h" 3 | 4 | #if ! __has_feature(objc_arc) 5 | #warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC). 6 | #endif 7 | 8 | // Log levels : off, error, warn, info, verbose 9 | // Other flags: trace 10 | static const int httpLogLevel = HTTP_LOG_LEVEL_OFF; // | HTTP_LOG_FLAG_TRACE; 11 | 12 | 13 | @implementation HTTPDataResponse 14 | 15 | - (id)initWithData:(NSData *)dataParam 16 | { 17 | if((self = [super init])) 18 | { 19 | HTTPLogTrace(); 20 | 21 | offset = 0; 22 | data = dataParam; 23 | } 24 | return self; 25 | } 26 | 27 | - (void)dealloc 28 | { 29 | HTTPLogTrace(); 30 | 31 | } 32 | 33 | - (UInt64)contentLength 34 | { 35 | UInt64 result = (UInt64)[data length]; 36 | 37 | HTTPLogTrace2(@"%@[%p]: contentLength - %llu", THIS_FILE, self, result); 38 | 39 | return result; 40 | } 41 | 42 | - (UInt64)offset 43 | { 44 | HTTPLogTrace(); 45 | 46 | return offset; 47 | } 48 | 49 | - (void)setOffset:(UInt64)offsetParam 50 | { 51 | HTTPLogTrace2(@"%@[%p]: setOffset:%lu", THIS_FILE, self, (unsigned long)offset); 52 | 53 | offset = (NSUInteger)offsetParam; 54 | } 55 | 56 | - (NSData *)readDataOfLength:(NSUInteger)lengthParameter 57 | { 58 | HTTPLogTrace2(@"%@[%p]: readDataOfLength:%lu", THIS_FILE, self, (unsigned long)lengthParameter); 59 | 60 | NSUInteger remaining = [data length] - offset; 61 | NSUInteger length = lengthParameter < remaining ? lengthParameter : remaining; 62 | 63 | void *bytes = (void *)([data bytes] + offset); 64 | 65 | offset += length; 66 | 67 | return [NSData dataWithBytesNoCopy:bytes length:length freeWhenDone:NO]; 68 | } 69 | 70 | - (BOOL)isDone 71 | { 72 | BOOL result = (offset == [data length]); 73 | 74 | HTTPLogTrace2(@"%@[%p]: isDone - %@", THIS_FILE, self, (result ? @"YES" : @"NO")); 75 | 76 | return result; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /Benchmarking/BaseNSLogging.m: -------------------------------------------------------------------------------- 1 | #import "BaseNSLogging.h" 2 | #import "PerformanceTesting.h" 3 | 4 | #define DDLogVerbose NSLog 5 | #define DDLogInfo NSLog 6 | #define DDLogWarn NSLog 7 | #define DDLogError NSLog 8 | 9 | #define FILENAME @"BaseNSLogging " // Trailing space to match exactly the others in length 10 | 11 | 12 | @implementation BaseNSLogging 13 | 14 | + (void)speedTest0 15 | { 16 | // Log statements that will not be executed due to log level 17 | 18 | for (NSUInteger i = 0; i < SPEED_TEST_0_COUNT; i++) 19 | { 20 | DDLogVerbose(@"%@: SpeedTest0 - %lu", FILENAME, (unsigned long)i); 21 | } 22 | } 23 | 24 | + (void)speedTest1 25 | { 26 | // Log statements that will be executed asynchronously 27 | 28 | for (NSUInteger i = 0; i < SPEED_TEST_1_COUNT; i++) 29 | { 30 | DDLogWarn(@"%@: SpeedTest1 - %lu", FILENAME, (unsigned long)i); 31 | } 32 | } 33 | 34 | + (void)speedTest2 35 | { 36 | // Log statements that will be executed synchronously 37 | 38 | for (NSUInteger i = 0; i < SPEED_TEST_2_COUNT; i++) 39 | { 40 | DDLogError(@"%@: SpeedTest2 - %lu", FILENAME, (unsigned long)i); 41 | } 42 | } 43 | 44 | + (void)speedTest3 45 | { 46 | // Even Spread: 47 | // 48 | // 25% - Not executed due to log level 49 | // 50% - Executed asynchronously 50 | // 25% - Executed synchronously 51 | 52 | for (NSUInteger i = 0; i < SPEED_TEST_3_COUNT; i++) 53 | { 54 | DDLogError(@"%@: SpeedTest3A - %lu", FILENAME, (unsigned long)i); 55 | } 56 | for (NSUInteger i = 0; i < SPEED_TEST_3_COUNT; i++) 57 | { 58 | DDLogWarn(@"%@: SpeedTest3B - %lu", FILENAME, (unsigned long)i); 59 | } 60 | for (NSUInteger i = 0; i < SPEED_TEST_3_COUNT; i++) 61 | { 62 | DDLogInfo(@"%@: SpeedTest3C - %lu", FILENAME, (unsigned long)i); 63 | } 64 | for (NSUInteger i = 0; i < SPEED_TEST_3_COUNT; i++) 65 | { 66 | DDLogVerbose(@"%@: SpeedTest3D - %lu", FILENAME, (unsigned long)i); 67 | } 68 | } 69 | 70 | + (void)speedTest4 71 | { 72 | // Custom Spread 73 | 74 | for (NSUInteger i = 0; i < SPEED_TEST_4_ERROR_COUNT; i++) 75 | { 76 | DDLogError(@"%@: SpeedTest4A - %lu", FILENAME, (unsigned long)i); 77 | } 78 | for (NSUInteger i = 0; i < SPEED_TEST_4_WARN_COUNT; i++) 79 | { 80 | DDLogWarn(@"%@: SpeedTest4B - %lu", FILENAME, (unsigned long)i); 81 | } 82 | for (NSUInteger i = 0; i < SPEED_TEST_4_INFO_COUNT; i++) 83 | { 84 | DDLogInfo(@"%@: SpeedTest4C - %lu", FILENAME, (unsigned long)i); 85 | } 86 | for (NSUInteger i = 0; i < SPEED_TEST_4_VERBOSE_COUNT; i++) 87 | { 88 | DDLogVerbose(@"%@: SpeedTest4D - %lu", FILENAME, (unsigned long)i); 89 | } 90 | } 91 | 92 | @end 93 | -------------------------------------------------------------------------------- /Benchmarking/StaticLogging.m: -------------------------------------------------------------------------------- 1 | #import "StaticLogging.h" 2 | #import "PerformanceTesting.h" 3 | #import "DDLogMacros.h" 4 | 5 | #define FILENAME @"StaticLogging " // Trailing space to match exactly the others in length 6 | 7 | // Debug levels: off, error, warn, info, verbose 8 | static const int ddLogLevel = LOG_LEVEL_WARN; // CONST 9 | 10 | 11 | @implementation StaticLogging 12 | 13 | + (void)speedTest0 14 | { 15 | // Log statements that will not be executed due to log level 16 | 17 | for (NSUInteger i = 0; i < SPEED_TEST_0_COUNT; i++) 18 | { 19 | DDLogVerbose(@"%@: SpeedTest0 - %lu", FILENAME, (unsigned long)i); 20 | } 21 | } 22 | 23 | + (void)speedTest1 24 | { 25 | // Log statements that will be executed asynchronously 26 | 27 | for (NSUInteger i = 0; i < SPEED_TEST_1_COUNT; i++) 28 | { 29 | DDLogWarn(@"%@: SpeedTest1 - %lu", FILENAME, (unsigned long)i); 30 | } 31 | } 32 | 33 | + (void)speedTest2 34 | { 35 | // Log statements that will be executed synchronously 36 | 37 | for (NSUInteger i = 0; i < SPEED_TEST_2_COUNT; i++) 38 | { 39 | DDLogError(@"%@: SpeedTest2 - %lu", FILENAME, (unsigned long)i); 40 | } 41 | } 42 | 43 | + (void)speedTest3 44 | { 45 | // Even Spread: 46 | // 47 | // 25% - Not executed due to log level 48 | // 50% - Executed asynchronously 49 | // 25% - Executed synchronously 50 | 51 | for (NSUInteger i = 0; i < SPEED_TEST_3_COUNT; i++) 52 | { 53 | DDLogError(@"%@: SpeedTest3A - %lu", FILENAME, (unsigned long)i); 54 | } 55 | for (NSUInteger i = 0; i < SPEED_TEST_3_COUNT; i++) 56 | { 57 | DDLogWarn(@"%@: SpeedTest3B - %lu", FILENAME, (unsigned long)i); 58 | } 59 | for (NSUInteger i = 0; i < SPEED_TEST_3_COUNT; i++) 60 | { 61 | DDLogInfo(@"%@: SpeedTest3C - %lu", FILENAME, (unsigned long)i); 62 | } 63 | for (NSUInteger i = 0; i < SPEED_TEST_3_COUNT; i++) 64 | { 65 | DDLogVerbose(@"%@: SpeedTest3D - %lu", FILENAME, (unsigned long)i); 66 | } 67 | } 68 | 69 | + (void)speedTest4 70 | { 71 | // Custom Spread 72 | 73 | for (NSUInteger i = 0; i < SPEED_TEST_4_ERROR_COUNT; i++) 74 | { 75 | DDLogError(@"%@: SpeedTest4A - %lu", FILENAME, (unsigned long)i); 76 | } 77 | for (NSUInteger i = 0; i < SPEED_TEST_4_WARN_COUNT; i++) 78 | { 79 | DDLogWarn(@"%@: SpeedTest4B - %lu", FILENAME, (unsigned long)i); 80 | } 81 | for (NSUInteger i = 0; i < SPEED_TEST_4_INFO_COUNT; i++) 82 | { 83 | DDLogInfo(@"%@: SpeedTest4C - %lu", FILENAME, (unsigned long)i); 84 | } 85 | for (NSUInteger i = 0; i < SPEED_TEST_4_VERBOSE_COUNT; i++) 86 | { 87 | DDLogVerbose(@"%@: SpeedTest4D - %lu", FILENAME, (unsigned long)i); 88 | } 89 | } 90 | 91 | @end 92 | --------------------------------------------------------------------------------