Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saving trace to error log
Message
De
18/05/2009 22:38:46
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
18/05/2009 21:29:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01400554
Message ID:
01400556
Vues:
57
>Hi All:
>
>How can you save the program trace information in an error log table when writing to it in an error handler?

Look at aStackInfo() - though, that will give you the stack only, not the last commands in the currently executing code. But at least you'll know how your code hit the error. Also list memory to a file, then filetostr() that file into a memo in your error log would help. You may try to strextract() your variables only - you don't need all the print system variables.

You can get the exact lines from the coverage logger, but it writes to disk, writes too much stuff, and - worst of all - you have to start it in advance. IOW, before the error happens. It may work in development, but at runtime it's not that useful if there's nobody to read it.

>Is saving the last 10 key presses as well too much to ask?

If you're asking yourself, it isn't :). IOW, you'd have to add code to keypress method of just about every class you have, or to bindevent() it to your key logger object. It can have an array of 10 rows, and you could always ains() the new first row, and it would push the 11th row out. You'd only have to add the key logger in the init of your forms and toolbars classes, then recurse through all controls which may have a keypress method, then bindevent() their .keypress to a method of the keylogger. May even be fast enough that nobody would notice it.

This still leaves you with no clue what did the user do with the menus and the mouse.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform