3.17 library(http/http_log): HTTP Logging module
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog HTTP support
        • The HTTP server libraries
          • library(http/http_log): HTTP Logging module
            • http_log_stream/1
            • http_log_close/1
            • http_log/2
            • post_data_encoded/2
            • http_logrotate/1
            • http_schedule_logrotate/2
Availability::- use_module(library(http/http_log)).
[semidet]http_log_stream(-Stream)
True when Stream is a stream to the opened HTTP log file. Opens the log file in 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.