• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 789
  • Last Modified:

App.StartLogging method is not working.

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
jsuper
Asked:
jsuper
1 Solution
 
jjbyersCommented:
You need to use the logevent method of the app object.
0
 
jsuperAuthor Commented:
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
 
chabaudCommented:
Are u using win95 or winNT ?
0
 
covingtonCommented:
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
 
jsuperAuthor Commented:
Thanks for the info...   That did the trick!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now