Closed thetristan closed 5 years ago
I like this change. I think it results in more useful logs.
@thetristan @davidhanley are you still interested in this?
I like the change, though it's not a priority for us at the moment.
@thetristan did you ever send these changes as a PR? I don't see a record of them?
Is there any opposition to me changing the
$repsheet
variable (or adding a new variable) that indicates the action the repsheet module took for the current request?Examples:
$repsheet
would be set toblacklist
$repsheet
would be set tomark
$repsheet
would be set towhitelist
$repsheet
would be left unsetThe
$repsheet_reason
variable would also be updated to include the reason and actor. E.g.IP 127.0.0.1 was marked: bad robot
,User foo was blocked: an important reason
. Or alternatively$repsheet_reason
could be left as is and a new variable$repsheet_actor
could be introduced.This change lets users log the action the repsheet module took for the current request (if any) as part of the access log by specifying
$repsheet
and/or$repsheet_reason
in alog_format
directive. This lets users more quickly determine the action repsheet took and see that action in the context of all the other data logged for a given request in the access log.If the user doesn't want to log the action the repsheet module took for the current request, they can simply omit using any of the
$repsheet
variables in the format string for their access logs.Sample error logs (from running the tests):