Opened 15 years ago
Closed 14 years ago
#208 closed enhancement (fixed)
Logging ROPP messages to a file
Reported by: | Dave Offiler | Owned by: | firi |
---|---|---|---|
Priority: | normal | Milestone: | 5.0 |
Component: | ROPP (all) | Version: | 4.0 |
Keywords: | logging, messages | Cc: | huw.lewis@… |
Description
Johannes Fritzer (GFZ) requests a facility to log ROPP messages to an external logfile (other than indirection of stdout).
1) When integrating ROPP routines into an application that uses a log file for documenting processing steps, diagnostics etc., the output of the ROPP messages is not in sequence with those of the application, since the ROPP messages are to stdout (causing them to appear at the end of the application log file when redirected to that log file). Would it be possible to add a "subroutine message_set_logFile(logFileName)" and a messages-module internal variable "msg_logFile" which indicates a file, to which the ROPP messages are written (without the formating used with the stdout stream)? By adding a block in the file message.f90, which directs the messages to the msg_logFile, if the msg_logFile /= "" and outputs the messages to stdout as usual, if msg_logFile == "", this could be done similarly as indicated in the attached files.
Attachments (1)
Change history (3)
by , 15 years ago
Attachment: | ropp_utils_msgs.f90 added |
---|
comment:1 by , 14 years ago
Included Johannes' beautifully clear fortran into ropp_pp/ropp_messages/message.f90 and messages.f90 without a hitch.
Note that these routines only provide an interface to a logfile. The user would still need to call message_set_logFile from their external-to-ROPP fortran programs. We haven't (for example) added "-l logfile" options to all the ropp tools, to define msg_logFile automatically. Checked with the user and he is happy with this.
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Close ticket after passing successfully through test folder.
Johannes Fritz's suggested message logging code