Closed harada-toshi closed 7 years ago
Thank you for reporting!
We can specify log level of audit log to the sever log by setting log_level
parameter in option
section, not level
parameter in output
section. Please try to set log_level = 'WARNING'
in option
section.
Also, pgaudit configuration parameters are always shown in LOG level, which is intentional, because these information is not audit information.
OK. We confirmed that audit log is output as WARNING by setting log_level = 'WARNING' in option section.
[output]
logger = 'serverlog'
[option] log_level = 'WARNING' role = 'auditor'
[rule] format = '%t,%d,%u,%p,%v,%statement_id,%sub_statement_id,%class,%command_tag,%object_type,%object_name,%command_text' class = 'READ,WRITE,DDL,ROLE,FUNCTION,MISC'
* Audit Log.
WARNING: AUDIT: SESSION,1,1,READ,2017-03-01 19:16:34 JST,postgres,postgres,[local],psql,2/3,0,,,SELECT,,,SELECT 1,
Thank you for checking, close.
Overview
LOG: log_level = 15
.config file sample
PostgreSQL Launch Log
Executed SQL
Audit Log