Logging

B

BobLaughland

Hi All,

I am development an ASP .NET C# web site.

Just wondering the best way to implement logging on my web site. (I
have a logging class to log database access, exceptions, etc, etc).

I have about 10 pages in my web site (that is 10 seperate c# files with
code), and 4 separate classes in the App_Code directory.

The issue is that I want to create 1 instance of the logging class that
can be accessed by all of my C# files.

It seems to me that the C# files are quite separate because they are
each a class, so I am struggling to see an easy way of doing that.

Thanks,

Peter.
 
J

Joerg Jooss

Thus wrote BobLaughland,
Hi All,

I am development an ASP .NET C# web site.

Just wondering the best way to implement logging on my web site. (I
have a logging class to log database access, exceptions, etc, etc).

I have about 10 pages in my web site (that is 10 seperate c# files
with code), and 4 separate classes in the App_Code directory.

The issue is that I want to create 1 instance of the logging class
that can be accessed by all of my C# files.

It seems to me that the C# files are quite separate because they are
each a class, so I am struggling to see an easy way of doing that.

You can create a facade of static methods or a singleton to perform logging.

Cheers,
 

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

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top