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
            • password_field/1
            • nolog/1
            • nolog_post_content_type/1
            • post_data_encoded/2
            • http_logrotate/1
            • http_schedule_logrotate/2
Availability::- use_module(library(http/http_log)).
[det]http_logrotate(+Options)
Rotate the available log files. Note that there are two ways to deal with the rotation of log files:

  1. Use the OS log rotation facility. In that case the OS must (1) move the logfile and (2) have something calling http_log_close/1 to close the (moved) file and make this server create a new one on the next log message. If library(http/http_unix_daemon) is used, closing is achieved by sending SIGHUP or SIGUSR1 to the process.
  2. Call this predicate at scheduled intervals. This can be achieved by calling http_schedule_logrotate/2 in the context of library(http/http_unix_daemon) which schedules the maintenance actions.

Options:

min_size(+Bytes)
Do not rotate if the log file is smaller than Bytes. The default is 1Mbytes.
keep_logs(+Count)
Number of rotated log files to keep (default 10)
compress_logs(+Format)
Compress the log files to the given format.
background(+Boolean)
If true, rotate the log files in the background.