CodeCanyon Event Log Writer 3755769

CodeCanyon Event Log Writer 3755769

CodeCanyon Event Log Writer 3755769
.NET Script \ Miscellaneous
Event \ Queue \ Tasking \ Thread \ Windows \ Write \ Multi \ Safe \ Fast \ Work

.NET Script - Event Log Writer 3755769 by AvantPrime @ CodeCanyon

.NET Script \ Miscellaneous

Last Update: 7 January 13; Compatible Browsers: IE6, IE7, IE8, IE9, Firefox 2, Firefox 3, Firefox 4, Safari 4, Safari 5, Opera, Chrome; Software Version: .NET 2.0, .NET 3.0, .NET 3.5, .NET 3.7, .NET 4.0, .NET 4.5; Files Included: C# CS.

The Event Log Writer .NET component provides you with a simple and robust method to write to the event log. One of the major highlight of this component is writing to the event log at defined intervals on a background thread. This ensures that the performance of your applications remains at peak! This component also offers high performance writes using cached writers – creates the writers for you ensuring that the correct writer is always used without the overhead of creating a new one all the time.

This component is built using the .NET 2.0 Framework which means in can be used in all .NET applications that are using the 2.0 framework or newer. This includes .NET 2.0, 3.0, 3.5, 4.0, & 4.5. This component can be used all types of .NET applications including.

- Console

- Windows Forms




- Windows Services

- Web Services (XML/WCF)

The component also ensures that many pitfalls are not encountered including.

- Deadlocks – thread safety through locking avoids deadlocks

- Memory leaks – clean up through the dispose method & consider problems such as the lapsed listener

- Exceptions leaks – Exception handling through to ensure undesired termination of the application does not occur

- ASP.NET ThreadPool & Service Unavailable – Give control of whether ThreadPool threads are used or not (by default no). This ensures that threads are not taken away from high availability ASP.NET applications causing the dreaded “Service Unavailable”

- Task/Background work structure – Flexible mechanism for creating complex background operations

- Strong name signed – Allows referencing in other application that are strong named signed & also installed into the Global Assembly Cache (GAC)

The example shows how to use the event writers.

Write to event log

Console.WriteLine("Writing two entries to the event log..");
var writerSetting = new EventLogWriterSetting(LogName, EventSource);
using (var writer = new EventLogWriter(writerSetting))
for (int i = 0; i < 2; i++)
var message = string.Format("EventWriter message on {0}", DateTime.Now);
Console.WriteLine(writer.WriteToLog(message, EventLogEntryType.Information)
- String.Format("Successfully wrote to the event log. Message: {0}", message)
"Unsuccessful attempt to write to the event log."

Write to event log using cached writers

EventLogWriterCache.WriteToLog(DateTime.Now.ToString(), LogName, EventSource, EventLogEntryType.Information);

Write to the event log using the queue mechanism

Console.WriteLine("Configuring QueueWriter to write every 10 seconds starting after 10 seconds with a write delay between messages of 10 milliseconds.");
var writerQueueSetting = new EventLogWriterQueueSetting
(TimeSpan.FromSeconds(10), TimeSpan.FromMilliseconds(10), TimeSpan.FromSeconds(10));
EventLogWriterQueue.Setting = writerQueueSetting;
var writerQueue = new EventLogWriterQueue(LogError);
var message = new EventLogWriterQueueMessage
String.Format("Queue message: {0}", DateTime.Now.ToString(CultureInfo.InvariantCulture)),
Console.WriteLine("Polling every four seconds for new entries in the event log..");
for (int i = 0; i < 4; i++)
// Only dispose after your queue is empty
while (!EventLogWriterQueue.IsQueueEmpty)

You get a fully documented solution which includes the core file & test project. Also you get a comprehensive help file documenting full usage and you get compiled assemblies for immediate usage within your application.

Background Work Scheduler.

Keywords: Event Log, background work, c-sharp, cached event log writers, fast performance, multi-tasking, queue, thread-safe, windows event log, write to event log.

Tags: Event, Queue, Tasking, Thread, Windows, Write, Multi

Premium CodeCanyon Event Log Writer 3755769 WordPress Themes, Website Templates, Mobile Themes, Flash Templates & Scripts from creative professional designers. Full details of CodeCanyon Event Log Writer 3755769 for digital design and education. CodeCanyon Event Log Writer 3755769 desigen style information or anything related.


Add Comments:
Enter Code: *