Solved

App.StartLogging method is not working.

Posted on 1998-12-10
5
752 Views
Last Modified: 2013-11-26
When I try to use the App.startlogging method and the app.logevent to log events happening in my application, I get no results.  I then began to use the App.logmode property to check to see if the app.startlogging method was working, and it does not seem to be producing any changes.  For example...

Using the following code

Msgbox app.logmode
msgbox app.startlogging "Testfile.log", 2
msgbox app.logmode

For each message box, I get a zero result.  I figure I'm doing something stupid, but don't have any documentation that mentions error logging.
0
Comment
Question by:jsuper
5 Comments
 
LVL 3

Expert Comment

by:jjbyers
ID: 1449333
You need to use the logevent method of the app object.
0
 
LVL 1

Author Comment

by:jsuper
ID: 1449334
In the original question I mention that I use the logevent method to try to post messages to the log.  The problem is that those messages are never getting into the log because my original attempt to turn logging on failed.

0
 
LVL 4

Expert Comment

by:chabaud
ID: 1449335
Are u using win95 or winNT ?
0
 
LVL 3

Accepted Solution

by:
covington earned 50 total points
ID: 1449336
Compile your app. It will work fine.


INFO: App.LogEvent Only Logs in Compiled Applications
Article ID: Q161306
http://support.microsoft.com/support/kb/articles/q161/3/06.asp 
 


--------------------------------------------------------------------------------

The information in this article applies to:
Microsoft Visual Basic for Windows Learning, Professional, and Enterprise Editions, versions 5.0, 6.0
Microsoft Visual Basic Control Creation, Learning, Professional, and Enterprise Editions, for Windows, version 5.0


SUMMARY
In Microsoft Visual Basic, Event Logging allows an application to add information to either a user-defined file or the Microsoft Windows NT Event Log when a user-defined criteria is met.

This functionality is only available when running a compiled application. If you attempt to use the logging methods while in the Microsoft Visual Basic development environment, the logging methods will be ignored.
0
 
LVL 1

Author Comment

by:jsuper
ID: 1449337
Thanks for the info...   That did the trick!
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

730 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