Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Services (http://www.velocityreviews.com/forums/f64-asp-net-web-services.html)
-   -   Getting a Log Folder Reference Path inside a helper project -- Please read (http://www.velocityreviews.com/forums/t786754-getting-a-log-folder-reference-path-inside-a-helper-project-please-read.html)

Rahul 11-28-2006 07:39 AM

Getting a Log Folder Reference Path inside a helper project -- Please read
 
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 12-07-2006 05:09 AM

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
>
>



All times are GMT. The time now is 10:15 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.