Support Questions

Find answers, ask questions, and share your expertise

Ranger log4j audit logs locations

avatar
Master Guru

where do the audit log files get posted when I enable audit to log4j on ranger using xasecure.audit.log4j.is.enabled=true? I know there is a property

xasecure.audit.hdfs.config.destination.directroy

however that is when i have logging to hdfs enabled.

1 ACCEPTED SOLUTION

avatar
Master Guru

Hi @Sunille Manjee, if you enable audit to log4j then you decide by yourself where to send audits by configuring log4appender properties.However, I'm not sure how exactly to do that: This document talks abut "Logging using Log4j" by configuring log4j.logger.xaaudit property. And there is also an example of Ranger-4 log4j audit to Kafka here, which uses slightly different property. No mention of this in docs for latest versions of Ranger, but I guess it can be done somehow.

View solution in original post

2 REPLIES 2

avatar
Master Guru

Hi @Sunille Manjee, if you enable audit to log4j then you decide by yourself where to send audits by configuring log4appender properties.However, I'm not sure how exactly to do that: This document talks abut "Logging using Log4j" by configuring log4j.logger.xaaudit property. And there is also an example of Ranger-4 log4j audit to Kafka here, which uses slightly different property. No mention of this in docs for latest versions of Ranger, but I guess it can be done somehow.

avatar
Master Guru

@Predrag Minovic I have seen that link and it is helpful. I found more info here as well on log4j appender ranger hive.