AppCtrlScript

MAY Computer

Help

FLUSHLOGGING

Applies to  

AppCtrlScript (Module: wmACScr1.dll)

Group  

Primary

See also  

ADDERROR, ADDWARNING

Writes current errors and warnings to specified or default logfile. If no logfile is specified then the application logfile of the program using ACScript is used.

This method is for longer operations that might cause a lot of errors or might hang during testing phase. Errors and warnings are kept in memory and usually logged to file only when the script finishes. Using this method you can force writing current errors and warnings to the logfile.

Important: If your script makes some additional logging or does other things depending on error occurrence then you should use this method only after checking for errors. And you should use this method only after a complete unit has been processed (if processing some items in loop).

By default errors and warnings are cleared after logfile has been written.

 

Syntax

FLUSHLOGGING [<LogFile>][, <Clear>]

Part

Description

<LogFile> Filename to log errors and warnings to (Optional). If missing then applications default logfile is used (usually <AppPath>\<AppExename>.log).
<Clear> 1|0; Optional flag if error and warning list should be cleared after logging. Default is 1.