Solved

Eliminate verbage when using app.logevent

Posted on 2006-11-29
2
538 Views
Last Modified: 2008-01-09
I'm using app.logevent in my VB applications to log different events, assignments, etc.  Everything works but I receive more information than I would like in the log file.  The following is an example of what is recorded:

Information Application E:\Log\ApplicationName.log: Thread ID: 848 ,Logged: This is a test

Everything prior to "This is a test" comes from the system.  Is there a way to eliminate this verbage?
0
Comment
Question by:TheChos
2 Comments
 
LVL 1

Accepted Solution

by:
weiroblpay earned 250 total points
Comment Utility
As far as I can tell, you can't. The App.LogEvent method doesn't have very much flexibility in it.

You can use APIs to write to the NT event log if you want, but you get the same problem with extra verbiage.
http://www.montgomerysoftware.com/WritingToNTEventLogInVB.aspx

If you want to write a log file that has only the information you want in it, then you will have to create that method yourself.
If you create a class wrapper for the functions you want, then it's easy to drop it into any application and use that as your logging.

Good luck.

0
 

Author Comment

by:TheChos
Comment Utility
Creating a class is an excellent idea.  I think I'll go that route.  Thanks for your help.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now