[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Eliminate verbage when using app.logevent

Posted on 2006-11-29
2
Medium Priority
?
548 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
weiroblpay earned 1000 total points
ID: 18046981
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
ID: 18047743
Creating a class is an excellent idea.  I think I'll go that route.  Thanks for your help.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

649 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