Using policy to log specific information about a request to the event log

book

Article ID: 167116

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

Using policy to log specific information about a request to the event log
You want help using policy to log specific information about a request to the event log

Resolution

Policy can be used to log specific information about a request using the 'log_message()' action.

Here is a sample policy using the log_message() action:

<Proxy>
category=("Nudity", "Sex") exception(content_filter_denied) action.log_policy(yes)

;define actions
define action log_policy
log_message("Policy Error: $(user) on resource $(client.address) went to $(url) on $(date) at $(time)")
end

For more information about the log_message() action, and Content Policy Language (CPL) substitutions (variables) that can be used with the log_message action, please refer to the Content Policy Language Reference.