Click here to Skip to main content
15,886,647 members
Articles / Desktop Programming / MFC
Article

Writing messages to EventLog

Rate me:
Please Sign up or sign in to vote.
2.28/5 (10 votes)
24 Feb 2004CPOL 43.5K   1.3K   10   4
A Wrapper class to handle writing to EventLog

Sample Image - ReportInEventLog.jpg

Sample screenshot

Introduction

When your program development is at a hault, you need some help to find out where your errors are, and a smart way is to debug your code, however sometimes your code can be large and it only fails sometimes. What you need is a log of Errors which you know are real errors. Instead of logging into a flat file and then loose it, you can log to the windows service EventLog.

CReportInEventLog class is a simple way of handling writting to the EventLog service.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) serupIT
Denmark Denmark
(BS.E.E)
I have been working with languages ranging from assembly 68000 to COBOL, OOC, MySQL, Perl, Java 8, JavaScript, C#, C++17, VC++ MFC and WinSockets.

I am currently working as a freelance software developer

Comments and Discussions

 
Generalfollow up Pin
hanseh13-Sep-07 16:48
hanseh13-Sep-07 16:48 
This is possible in .net library. Big Grin | :-D
AnswerRe: follow up Pin
Rajesh R Subramanian16-Sep-08 19:59
professionalRajesh R Subramanian16-Sep-08 19:59 
GeneralEvent Log Display Name Pin
hanseh13-Sep-07 16:46
hanseh13-Sep-07 16:46 
Generala Question Pin
YCW11-Mar-07 16:16
YCW11-Mar-07 16:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.