#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    28
    Rep Power
    0

    Log file Creation ?


    Can u guys help me with the best methods to create the LOG files for an application with examples, Rather than using third party applications.


    Thanks in advance...
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,057
    Rep Power
    383
    Probably not exactly what you wanted; but you said no third party components.

    Assuming that that includes the Codesite component that is part of recent Delphi versions:-

    What I did (a long time ago) in the interest of not writing the same code more than once
    is to build myself a small logging component that, internally, understands how to open a file, write to it and close it.
    I then gave it a few properties.
    FileName: String - obvious purpose
    TimeStamp: Boolean - whether to add a timestamp to each entry
    Enabled: Boolean - whether or not to write to the file

    And some methods like:
    WriteString(msg: string);

    This is the bare bones.
    Naturally you can add as much sophistication as you want.

    HTH: Clive
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    28
    Rep Power
    0
    Originally Posted by clivew
    Probably not exactly what you wanted; but you said no third party components.

    Assuming that that includes the Codesite component that is part of recent Delphi versions:-

    What I did (a long time ago) in the interest of not writing the same code more than once
    is to build myself a small logging component that, internally, understands how to open a file, write to it and close it.
    I then gave it a few properties.
    FileName: String - obvious purpose
    TimeStamp: Boolean - whether to add a timestamp to each entry
    Enabled: Boolean - whether or not to write to the file

    And some methods like:
    WriteString(msg: string);

    This is the bare bones.
    Naturally you can add as much sophistication as you want.

    HTH: Clive

    First of All,Thanks for the reply Clive.
    Right now i'm using Eureka log component.
    Using that i can find the error and its exact place where it occurs. but i wants a tool like SQL SERVER Profiler to find out, parameters and it's values passed for all the functions in our code and it's flow.
    Is there any tool or technique ?

    Thanks in advance.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,057
    Rep Power
    383
    I am not familiar with the tools you mention.
    Am I right in thinking that you want something that actually hooks into your code and
    reports on things without you actually inserting the log writing statements?

    Does AQTime that comes with Delphi recent releases (or the professional version) help?

    Clive
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    156
    Rep Power
    3
    Originally Posted by Murugavel
    but i wants a tool like SQL SERVER Profiler to find out, parameters and it's values passed for all the functions in our code and it's flow.
    Is there any tool or technique ?
    You may want to check Code Site. Its lite version (they name it Code Site Express) comes with Delphi XE2. I don't know with XE3.
    Last edited by Luthfi; September 29th, 2012 at 04:29 AM.

IMN logo majestic logo threadwatch logo seochat tools logo