Return weird if a log line is over a configurable size limit

This commit is contained in:
Tim Wojtulewicz 2025-07-15 15:23:43 -07:00
parent 9bda7493ec
commit 19346b93ad
11 changed files with 261 additions and 26 deletions

View file

@ -2901,7 +2901,20 @@ export {
auth_flavors: vector of auth_flavor_t &optional; ##< Returned authentication flavors
};
} # end export
}
module Log;
export {
## Maximum size of a message that can be sent to a remote logger or logged
## locally. If this limit is met, report a ``log_line_too_large`` weird and drop
## the log entry. This isn't necessarily the full size of a line that might be
## written to a log, but a general representation of the size as the log record is
## serialized for writing. The size of end result from serialization might be
## higher than this limit, but it prevents runaway-sized log entries from causing
## problems.
const max_log_record_size = 1024*1024*64 &redef;
}
module POP3;