:- use_module(library(http/http_log)). [semidet]http_log_stream(-Stream)
[semidet]http_log_stream(-Stream)append mode if the file is not yet 
open. The log file is determined from the setting http:logfile. 
If this setting is set to the empty atom (” ), this predicate 
fails.
If a file error is encountered, this is reported using print_message/2, after which this predicate silently fails. Opening is retried every minute when a new message arrives.
Before opening the log file, the message http_log_open(Term) 
is broadcasted. This message allows for creating the directory, 
renaming, deleting or truncating an existing log file.