Getting a Log Folder Reference Path inside a helper project -- Please read

Discussion in 'ASP .Net Web Services' started by Rahul, Nov 28, 2006.

  1. Rahul

    Rahul Guest

    Hi

    I have a project A that uses a Web Service Project B .
    Project A uses another Project named Utility , -- that is responsible
    for logging the errors as well as comments in the log file.

    The structure is like this

    ----- Project B (Web Service)
    |
    ----Project A(DLL's Packed Inside mostly implmentation)
    |
    ----Project Utility ) Project A uses Utility project to log - also
    Project B can also use Utiltiy.

    My question is Since the Utility project is reponsible for writing the
    msg to the log file how do i make sure that All the logs are written to
    LOG folder under Project B.

    I am not able to understand how and from where Utility Project should
    read the path so that it understands that it has to write messages
    under the log file that is placed under LOG folder under Project B. as
    during deployment the user can deply this web service project in any
    drive, etcc.

    Would appreciate your help.

    Thanks
     
    Rahul, Nov 28, 2006
    #1
    1. Advertising

  2. Rahul

    Catalin T Guest

    RE: Getting a Log Folder Reference Path inside a helper project -- Ple

    Rahul,
    You can design your logging DLL to take the path of the LOG folder from the
    calling application, in your case Project B or A. In Project B (WS) you can
    translate the logical path of LOG to physical path using Server.Map, that way
    no matter where the app is installed the path will be correctly translated to
    physical and passed to the logging tool.

    Hope this helps.
    Catalin Tomescu


    "Rahul" wrote:

    > Hi
    >
    > I have a project A that uses a Web Service Project B .
    > Project A uses another Project named Utility , -- that is responsible
    > for logging the errors as well as comments in the log file.
    >
    > The structure is like this
    >
    > ----- Project B (Web Service)
    > |
    > ----Project A(DLL's Packed Inside mostly implmentation)
    > |
    > ----Project Utility ) Project A uses Utility project to log - also
    > Project B can also use Utiltiy.
    >
    > My question is Since the Utility project is reponsible for writing the
    > msg to the log file how do i make sure that All the logs are written to
    > LOG folder under Project B.
    >
    > I am not able to understand how and from where Utility Project should
    > read the path so that it understands that it has to write messages
    > under the log file that is placed under LOG folder under Project B. as
    > during deployment the user can deply this web service project in any
    > drive, etcc.
    >
    > Would appreciate your help.
    >
    > Thanks
    >
    >
     
    Catalin T, Dec 7, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SpaceMarine

    helper function - full app path ("~/")

    SpaceMarine, Mar 2, 2009, in forum: ASP .Net
    Replies:
    9
    Views:
    975
    SpaceMarine
    Mar 17, 2009
  2. Jochen Brenzlinger
    Replies:
    5
    Views:
    955
    Roedy Green
    Sep 2, 2011
  3. Chris

    Helper function inside template column

    Chris, Nov 24, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    115
    Michael Tkachev
    Nov 25, 2003
  4. bojo
    Replies:
    1
    Views:
    171
  5. kevin
    Replies:
    1
    Views:
    381
    Kairi Zikpin
    Jul 21, 2006
Loading...

Share This Page