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

R

Rahul

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
 
C

Catalin T

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top