Help for Logger implementation

Discussion in 'iOS Programming' started by sujithkrishnan, Sep 23, 2008.

  1. sujithkrishnan macrumors 6502

    Joined:
    May 9, 2008
    Location:
    Bangalore
    #1
    Hi all..

    In my app i am writing some entries to log using NSLog()...
    In simulator, it is printing in console...

    I tried my app in device, ut when i viewed its Logs (in Xocde) my application is writing nothing to it... Why??? (NSLog is not the one i want to use?)

    Also.. how i can view the Logs normally if i am not having Xcode ...
    In want my app to write some info to LOG, and user should be able to send me on request. Can user access the logs thru iTunes??

    Anyway priority is how to make entries into Logs from my apps..
    Why NSLog not writing anything in device's log??
     
  2. mccannmarc macrumors 6502

    mccannmarc

    Joined:
    Aug 15, 2008
    Location:
    Manchester, UK
    #2

    If you keep your device connected to your mac whilst it is running the NSLog()'s will be shown in the debugger console just like when you run it in the simulator.

    If you want to save logs that the user can send you then you will have to create your own logging function that saves to a log file in the applications document directory. You could then have a button somewhere in your app that allows the user to send that log to your server or as an attachment in an email etc etc.
     
  3. sujithkrishnan thread starter macrumors 6502

    Joined:
    May 9, 2008
    Location:
    Bangalore
    #3
    Thanking you for quick reply...
    So u answered me the way i want to implement...

    But why my entries are not visible in Device's console (eventhough i tried app aftr disconnecting frm Mac.)

    But i played a game in device, and i can see the logs for that... (in Xcode, can i see it with iTunes?)
     

Share This Page