remirobert / Dotzu

:iphone::eyes: In-App iOS Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More.
MIT License
1.8k stars 141 forks source link

Decouple NSKeyArchiver from StoreManager.swift #29

Open johndpope opened 7 years ago

johndpope commented 7 years ago

further to investigation https://github.com/remirobert/Dotzu-Objective-c/issues/4

I drafted this code for your review https://gist.github.com/johndpope/1dd3663a8712bb1901536a44bccd6a5a

this way - if we can get this into core library, I can over ride this with any library that conforms to logging protocol,

protocol LogProvider { func archiveLogs(logs: [T]) func storedDataForKey(key:String)->NSData? func logs() -> [T] func reset() }

johndpope commented 7 years ago

when my app starts - there's so much rapid logging - it takes dotzu logger some time to catch up. need to fix this. If I open a PR - will you consider merging?

johndpope commented 7 years ago

@remirobert - fyi https://github.com/gregheo/SwiftAveiro2017

wwe-johndpope commented 7 years ago

@remirobert - this library is conflicting with another library that is unhooking the following hooks.

-> LoggerCrash.unregister() this is called - even though - register is never called. NSSetUncaughtExceptionHandler(nil) signal(SIGILL, SIG_DFL) signal(SIGABRT, SIG_DFL) signal(SIGFPE, SIG_DFL) signal(SIGBUS, SIG_DFL) signal(SIGSEGV, SIG_DFL) signal(SIGSYS, SIG_DFL) signal(SIGPIPE, SIG_DFL) signal(SIGTRAP, SIG_DFL)