Asynchronous logging using logging application block

Hi,

 Is it possible to have Asynchronous logging using LAB?

I also wanted to know the advantages of LAB over Log4Net.

Or should I go for writing my own asynchronous logger?

 

Please Help,

Robin

0
rboin
6/6/2008 4:19:02 PM
asp.net.application-block 1007 articles. 0 followers. Follow

7 Replies
1172 Views

Similar Articles

[PageSpeed] 52
Get it on Google Play
Get it on Apple App Store

Hi, 

rboin.dock:
Is it possible to have Asynchronous logging using LAB?

NO the LAB is not Asynchronous by default.  But you can make it Asynchronous using MSMQ 

rboin.dock:
I also wanted to know the advantages of LAB over Log4Net.
 

 LAB is one of the most complex application block articture wise. it supports many listeners and it is highly configurable.

And advantage over the the Log4Net: May be because it is Microsoft Initative :)

rboin.dock:
should I go for writing my own asynchronous logger?

Yes, if you want a lightweight logger, which only logs to a file or event logger, then go for writing your own Asynchronous logger.

 

Following post will give you more info as well as some useful links:

http://forums.asp.net/p/1117624/1736413.aspx#1736413

 

Hope this helps,

 

Thanks,

Anup

 


Always remember to click 'Mark as Answer' on the post that helps you.

 


--Go for it now. The future is promised to no one.--
0
anup_daware
6/9/2008 4:49:40 AM

Hi Anup,

Thank you very mukch for this, you answered all the questions!

 Best Regards,

Rob

 

 

 

0
rboin
6/9/2008 5:06:57 AM

 Hi Anup,

 

Can you please give me some pointers on how to make my logger asynchronous?

 

Thanks,

Rob

0
rboin
6/20/2008 10:17:55 AM

 Hi Anup,

 

Can you please give me some pointers on how to make my logger asynchronous?

 

Thanks,

Rob

0
rboin
6/20/2008 10:28:49 AM

 Hi Rob,

 Few Suggestions:

1. Make the logger class singleton

2. Keep a queue of log messages in Logger class

3. Current threads will just add the records to the queue and will not do actual I/O operation (so performance is assured)

4. Run a separate thread in Logger class which will periodically access the queue and to log the messages in file or whatever the destination is.

 

You have to be very careful about the race and deadlocks in this case. Thus may have to do proper synchronization

 

Thanks,

Anup

 


--Go for it now. The future is promised to no one.--
0
anup_daware
6/20/2008 10:39:22 AM

 Hi Anup,

 

Thanks for these valuable suggestions. Could you please forward me some good link to start on threading?

 

Regards,

Rob

 

0
rboin
6/20/2008 10:45:01 AM

Hi Rob,

 Following is the best book  on threading

Threading in C# by Joseph Albahari

http://geekswithblogs.net/ram/archive/2006/06/16/82078.aspx

 

Hope this helps  

Thanks,

Anup

 


--Go for it now. The future is promised to no one.--
0
anup_daware
6/24/2008 3:23:49 AM
Reply:

Similar Artilces:

What is logging application block and Exception Handling Application Block?
 What is logging application block and Exception Handling Application Block? Please Help  Logging Application Blockhttp://msdn2.microsoft.com/en-us/library/aa480464.aspx "The Enterprise Library Logging Application Block simplifies the implementation of common logging functions. Developers can use the Logging Block to write information to a variety of locations: The event log An e-mail message A database A message queue A text file A WMI event Custom locations using application block extension points " Exception Handling Application Blockhttp://ms...

Cannot do Database logging using Enterprise library Logging Application Blocks
Hello,     I am trying to build a custom TraceListener to do Custom DB Logging for our application. When I try to do Logging using the custom DB logger, loading the trace listeners throws an exception. The Exception is "The Value cannot be null or empty string. Parameter Name = name" This is happening while trying to call the Buildup method recursively in the Builderstrategy class. I think I do have my configuration right. I also have all the required Dlls in the bin folder. Cannot figure out what is happening. The same error happened while I was trying to use the existing ...

Logging Application Block: Its it Asynchronous?
I am planing to use the Enterprise Library 2.0 Logging Application block, But I am stuck at a very basic design level issue.Is the loges written to various destinations asynchronously? If it is not asynchronous then its a real disadvantage I see.Microsoft  claims that they have implemented all the best practices  internally, but its no where mentioned what exactly they have done to ensure the performance. If I implement my own Logger I can make it asynchronous and I can score over Application block of enterprise library, moreover I can set the thread priority of the logging th...

Log to multiple places with Logging Application Block 3.0
Hi I am just starting to research the Logging Application Block, as we want to implement it a new version of our application. One of the things we would like to be able to do is log something to more that one listener - like to the database and also send an email, or to the event log and also to the database. I have been perusing the documentation and forums but found nothing related to the scenario. Is this possible and if so are there any examples?Our environment is: Enterprise Library 3.0 ..Net Framework 2.0, ASP.Net, VB.Net Oracle (Implemented Data Access Application Block and it ...

How to configure database to use Logging Application Block
Hi someone have a example of the script that create database infra-structure to use Logging Application Block? Or create a simple table with fields:  @EventID int,  @Priority int,  @Severity nvarchar(32),  @Title nvarchar(256),  @Timestamp datetime, @MachineName nvarchar(32),  @AppDomainName nvarchar(512), @ProcessID nvarchar(256), @ProcessName nvarchar(512), @ThreadName nvarchar(512), @Win32ThreadId nvarchar(128), @Message nvarchar(1500), @FormattedMessage ntext and the SP below to insert data in this table is sufficient?1...

Logging Application Block (RollingFlatFile) creates two simultaneous log files
I am using Logging Application Block (3.1) Rolling flat file trace listener to write debug info to file Debug.log for an ASP.NET 2 web app (aspx). After a session, I have TWO log files created. One called:Debug.log ... the other called:8f3a2757-ad8b-48e6-90cc-366e14d507b8Debug.log They contain overlapping time ranges, for requests from the same user/sessionID/client IP. What causes the two files?(I'm thinking "Web Farm", and will add logging for the AppDomainName and Server IP.) I am having problems with session variables (the reason for the debugging). Thanks,Mark The ...

How to use DataBase Access Application Block of Enterprise Library in .net applications
Hi to all,       I am New to Enterprise library. I am using the Enterprise library 4.0 ,Actually i am using the DataBase Access Application Block,Here i am giving the steps which i ahve followed.The problem is when i tried to run the application i am getting the error like "batabase not found in the connection string".   Steps i done are, I had added App.config file to the solution.i had edited App.config file through Enterprise library configuration. selected DataAccessApplication Block -> in the properties window i had changed the...

Logging Application Block not writing to Event Log on Windows 2000 SP4
Hi. I am having issues logging to the Event Log. Although my code is able to log in the Event Log n my Windows XP box with VS2005, when I deploy to the DEV machine it does not. The DEV box has Windows Server 2000 SP4. I've added another loggingConfiguration listener that instead uses the FlatFileTraceListenerData instead of the FormattedEventLogTraceListenerData and it also works both on my local machine and on the DEV server. Just to ensure permissions are not an issue I've setup my website to use a local admin account for Anonymous Access under Authentication Methods. ...

Logging Application Block
I have integrated the Logging Application Block (2.0) in my application. I am using the Formatted DatabaseTraceListener so I can log the exceptions in the database. Although I am using the default tables (Log, Category and CategoryLog), I would like to rename the tables to something else. Is that possible? If someone could point me to any article, it would be great. Also, I would like to know what all changes would be required in the configurations if I had to add some custom fields to the Log table.Thanks Hi AmNoGeek,            ...

Logging application block
Hi, I am using Enterprise Library Logging application block to log exceptions to event viewer. I have configured this in my website web.config file and also in my WCF service web.config file. I have deployed portal and service in IIS 6.0. I have created a new website pointing to portal and a virtual directory inside the website to point to WCF service. When I try to access the service, I get error "The entry 'Formatted EventLog TraceListener' has already been added." When I tried different options like pointing portal to one virtua...

MS Logging Application Block only writes Information type entries in the Event Log
I just started and gone the MS Logging Application Block working fine, except it only stores Information type entries. The previous method System.Diagnostics.EventLog.WriteEntry allowed me to pass an EventLogEntryType which would result in the type and icon appearing in the Event Viewer.  Can anyone tell me how to do this with the MS Logging Application Block or direct me to an example? Thank you!...

Help setting up Exception Handling/Logging Application Blocks, and an odd Logging issue...
Man, I've already spent a couple days looking into this and haven't got very far...What is the proper way to use the Exception Handling application block?It looks like you setup various Exception Policies, and those policies can handle exceptions in different ways.  So, for example, if you wanted to setup a policy dealing with Data Access, you'd create a DataAccess Exception Policy, add the type of Exceptions you want to handle a certain way, and then in your code write:try{ // DataAccess code that could throw an error}catch (Exception ex){ bool rethrow = ExceptionPoli...

Trying to use Exception and Logging Application Block in a website
Hi,  I am studying the Exception and Logging Application Blocks for including them in a website i am developing. I am building the framework for it. What i have done until now is: - Created a solution - Added to the solution the projects Common, ExceptionHandling, ExceptionHandling.Logging and Logging from the Enterprise Library (3.1, may 2007). I rebuilt each of these project sucessfully. Although at the moment i don't want to change nothing, in the future it is more than possible. - Added a project for the data access Layer, and for this project I added a reference...

Use of tokens in the Logging Application Block (3.1)
Where or how can i find out about the complete list of these.  it seems to be an obscure thing.  Like for example for {appdomain}, by default it gives a guid-ish id as appose to the application name.  Why is that. Thanks B ...

Web resources about - Asynchronous logging using logging application block - asp.net.application-block

Talk:Asynchronous Transfer Mode - Wikipedia, the free encyclopedia
This article is within the scope of WikiProject Computing , a collaborative effort to improve the coverage of computers , computing , and information ...

Facebook adds asynchronous voice messages to Messenger app; begins testing VoIP in Canada
Facebook today released an update for its standalone Messenger app to allow users to record and send each other voice messages. The company also ...

Google Dart upgrade homes in on asynchronous programming
Google has released Dart 1.9, with a focus on asynchronous programming.

Decomposing Asynchronous Workers in Ruby
... pieces of our systems, we can potentially come away with new ways to compose the same functionality with multiple smaller pieces. Take asynchronous ...

AMD Dives Deep On Asynchronous Shading
... to reduce display chain latency, and finally features to reduce rendering latency. Key among the latter features set is support for asynchronous ...

Hero Academy brings smart, asynchronous strategy to Android
After a lengthy stay on iOS, Hero Academy is now available for Android. The turn-based strategy game uses a kind of card mechanic mixed with ...

Turn Based Asynchronous Games: iPad/iPhone Apps AppList
... heard of Draw Something and Words With Friends, Most people have heard of Draw Something and Words With Friends, but there are a lot more asynchronous ...

Apple patents iPhone camera remote control with display, asynchronous notifications
The U.S. Patent and Trademark Office on Tuesday granted Apple a patent for a wireless accessory that can control an iPhone's camera functions, ...

Watch Dogs Asynchronous Multiplayer Trailer Turns This Into A Must-Buy Game
For the first time since I've laid eyes on Watch Dogs the game has finally portrayed itself as a must-buy title. All before now we've seen glimpses ...

Really Simple Asynchronous Web Services
Web services are better suited for the message-oriented communication paradigm, rather than remote procedure calls, the author says.

Resources last updated: 12/7/2015 8:03:17 AM