Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User robbin123's Avatar
    Join Date
    Jun 2006
    Posts
    23
    Hi,

    I am implementing an applicaiton on S60_2.1 SDK. How to implement a log file for this application? so when i run the app on the phone hw, for each running i can have a text log file afterwards. Otherwise i wound not know what happened during the test run....

    So can someone tell me how to implement this applicaiton log file for the phone HW?

    Thanks!

  2. #2
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,667
    one easy way would be using RFile.

    yucca

  3. #3
    Nokia Developer Champion kiran10182's Avatar
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,236
    Hello dear,

    1)first of all u need to add one line in yr .Pkg file:
    "\Symbian\8.0a\S60_2nd_FP2\epoc32\wins\c\System\Log.txt"-"!:\system\Log.txt"

    2)Then add one line in yr .cpp file where u want to generate log implemetation:
    _LIT(KLogFile,"c:\\system\\Log.txt");


    3)Then in yr each function add following code:

    RFs aFs;
    aFs.Connect();
    RFile LogFile;
    TInt iErr= LogFile.Open(aFs,KLOGFile,EFileWrite|EFileStreamText);
    pos=0;
    LogFile.Seek(ESeekEnd,pos);

    LogFile.Write(_L8("In MyFunction()\n"));

    LogFile.Close();
    aFs.Close();

    All the best,
    Kiran.

  4. #4
    Registered User mateen_maldar's Avatar
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,063
    hi,

    There is an example of helperfunctions in ur Series60Ex folder given with the sdk which implements the demo for the logfile ..Check that and let us know.

    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  5. #5
    Super Contributor eswar_illuri's Avatar
    Join Date
    May 2005
    Location
    Hyderabad,India
    Posts
    704
    Hi,

    one simple way use RFileLogger.

    regards,
    eswar

  6. #6
    Registered User robbin123's Avatar
    Join Date
    Jun 2006
    Posts
    23
    thanks to all!!

  7. #7

Similar Threads

  1. could not find thread.mbg and thread.rsg
    By deercrane in forum Symbian C++
    Replies: 3
    Last Post: 2006-04-18, 09:44
  2. Symbian1 : error PRJ0003 : Error spawning 'cl.exe'
    By ssaqibbukhari in forum OMA DM/DS/CP
    Replies: 0
    Last Post: 2006-04-15, 09:48
  3. File corrupted
    By MrJou in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 6
    Last Post: 2006-03-22, 08:26
  4. problem with log file of Phone
    By samarth_shroff in forum General Development Questions
    Replies: 1
    Last Post: 2005-08-14, 16:25
  5. Log / Telephone Application Corrupt Log File
    By simulacara in forum Symbian C++
    Replies: 0
    Last Post: 2002-12-16, 23:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved