Name
CloseLogFiles —
objLogUtil
.CloseLogFiles
lngIOMode
Synopsis
Closes all log files currently open in the IO mode specified in the
intIOMode parameter.
Parameters
-
lngIOMode The mode of the files you want to close. Its value can be any one of the following constants (from the type library) or its corresponding Long value:
-
ForReading (1) Closes those files that have been opened for read-only access.
-
ForWriting (2) Closes those files that have been opened for read/write access.
-
AllOpenFiles (32) Closes all open files.
-
Example
See the example at the end of this chapter.
Notes
It is very important to close whatever log files you open before the end of your script. Holding log files open takes memory from the server and, although this memory should be released at the end of the script, there is no guarantee that this will happen.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access