×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    23

    how to implement a log file

    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 Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: how to implement a log file

    one easy way would be using RFile.

    yucca

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,336

    Smile Re: how to implement a log file

    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
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: how to implement a log file

    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
    Join Date
    May 2005
    Location
    Hyderabad,India
    Posts
    704

    Re: how to implement a log file

    Hi,

    one simple way use RFileLogger.

    regards,
    eswar

  6. #6
    Registered User
    Join Date
    Jun 2006
    Posts
    23

    Re: how to implement a log file

    thanks to all!!

  7. #7
    Nokia Developer Expert
    Join Date
    Jun 2006
    Posts
    28

    Re: how to implement a log file


Similar Threads

  1. could not find thread.mbg and thread.rsg
    By deercrane in forum Symbian
    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
    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
  •