Kbase P180547: Does the LOG-MANAGER handle allow you to close the log then reopen it and append to it?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/13/2011 |
|
Status: Unverified
GOAL:
Does the LOG-MANAGER handle allow you to close the log then reopen it and append to it?
GOAL:
How do I reopen a close LOG-MANAGER log file?
FACT(s) (Environment):
OpenEdge 10.x
All Supported Operating Systems
FIX:
The LOG-MANAGER handle does allow you to close the log file, reopen it and continue appending data to it. The following code shows how to do it:
LOG-MANAGER:LOGFILE-NAME = "SOME.LOG".
LOG-MANAGER:WRITE-MESSAGE("MESSAGE 1").
LOG-MANAGER:CLOSE-LOG().
/* LOG IS CLOSED, IF YOU ATTEMPT TO CALL WRITE-MESSAGE() NOW YOU WILL GET AN ERROR */
/* SETTING THE LOGFILE-NAME ATTRIBUTE TO THE SAME NAME WILL REOPEN THE FILE */
LOG-MANAGER:LOGFILE-NAME = "SOME.LOG".
LOG-MANAGER:WRITE-MESSAGE("MESSAGE 2").
LOG-MANAGER:CLOSE-LOG().