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

Only print statements from 1st view controller appear in dotzu log #31

Closed Mozahler closed 7 years ago

Mozahler commented 7 years ago

I have a tab bar controller with each view controller inside a navigation controller getting its own tab. In Xcode I get log messages that don't appear in the app (dotzu's green and black screen). It seems I only get messages from the 1st view controller, but not the 2nd. Do I need to enable in each file, or just in the AppDelegate.swift file? What else could I be doing wrong?

wwe-johndpope commented 7 years ago

paste the code in a gist. did you set a break point? maybe the print logging is not being invoked. try with print ("Test")

Mozahler commented 7 years ago

why would it be invoked in one view controller and not the other? the only "code" is:

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        Dotzu.sharedManager.enable()
....
}
johndpope commented 7 years ago

what logging are you using?

Logger.verbose("Test")

Do you have some settings switched off in app screen to disable some conditions?

remirobert commented 7 years ago

very strange, as @johndpope which Logger are you using. Even if you are using print, you will need to import Dotzu everywhere.

Mozahler commented 7 years ago

Thanks. The readme instructions said to put it in app delegate. I guess they should say but it in any class you want to trace.

Sent from my iPhone

On May 19, 2017, at 5:30 PM, r é m i  notifications@github.com wrote:

very strange, as @johndpope which Logger are you using. Even if you are using print, you will need to import Dotzu everywhere.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

remirobert commented 7 years ago

So you can initialise Dotzu everywhere in your app. Dotzu will analyse everything by default. If you want only a specific class, you will need to enabled and disabled Dotzu.

remirobert commented 7 years ago

@Mozahler Here what you can do :

//When you enter in the controller
Dotzu.sharedManager.enable()

//When you leave the controller
Dotzu.sharedManager.disable()