You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Bryan Bende <bb...@gmail.com> on 2016/04/20 19:09:15 UTC

Logging in Ranger

Two questions regarding logging in Ranger...

1) Should code running in Ranger use commons logging to get a logger?

It appears log4j and slf4j are on the classpath, but most existing code
seems to use commons logging, just wanted to confirm.

2) Which logging configuration file does Ranger admin webapp use?

I tried modifying ews/webapp/WEB-INF/log4j.xml and restarting the webapp,
but didn't see any logging for my package.

Thanks,

Bryan

Re: Logging in Ranger

Posted by Bryan Bende <bb...@gmail.com>.
Thanks guys, that was it. Changing log4j.properties to debug got my output
coming out.

On Wed, Apr 20, 2016 at 1:48 PM, Velmurugan Periasamy <
vperiasamy@hortonworks.com> wrote:

> https://issues.apache.org/jira/browse/RANGER-887 is committed on 15th
> April to make ranger admin use log4j.properties.
>
>
> On 4/20/16, 1:43 PM, "Don Bosco Durai" <bo...@apache.org> wrote:
>
> >I thought there was a recent change to use log4j.properties. Not sure
> >whether it was committed recently.
> >
> >FYI, I have been using log4j for logging. But I agree, we should
> >standardize on one.
> >
> >Bryan, on the plugin side, we should use whatever the component uses.
> >
> >Thanks
> >
> >Bosco
> >
> >
> >
> >
> >On 4/20/16, 10:20 AM, "Ramesh Mani" <rm...@hortonworks.com> wrote:
> >
> >>Bryan,
> >>
> >>I have seen bothlog4j and slf4j being used in Ranger. Many of the new
> >>codes uses slf4j.
> >>
> >>For Ranger admin ews/webapp/WEB-INF/log4j.xml is the right one and there
> >>is xa_log_appender for ranger.
> >>
> >><category name="org.apache.ranger" additivity="false">
> >>              <priority value="info" />
> >>              <appender-ref ref="xa_log_appender" />
> >>      </category>
> >>
> >>
> >>Thanks,
> >>Ramesh
> >>
> >>On 4/20/16, 10:09 AM, "Bryan Bende" <bb...@gmail.com> wrote:
> >>
> >>>Two questions regarding logging in Ranger...
> >>>
> >>>1) Should code running in Ranger use commons logging to get a logger?
> >>
> >>>
> >>>It appears log4j and slf4j are on the classpath, but most existing code
> >>>seems to use commons logging, just wanted to confirm.
> >>>
> >>>2) Which logging configuration file does Ranger admin webapp use?
> >>>
> >>>I tried modifying ews/webapp/WEB-INF/log4j.xml and restarting the
> >>>webapp,
> >>>but didn't see any logging for my package.
> >>>
> >>>Thanks,
> >>>
> >>>Bryan
> >>
> >
> >
>
>

Re: Logging in Ranger

Posted by Velmurugan Periasamy <vp...@hortonworks.com>.
https://issues.apache.org/jira/browse/RANGER-887 is committed on 15th
April to make ranger admin use log4j.properties.


On 4/20/16, 1:43 PM, "Don Bosco Durai" <bo...@apache.org> wrote:

>I thought there was a recent change to use log4j.properties. Not sure
>whether it was committed recently.
>
>FYI, I have been using log4j for logging. But I agree, we should
>standardize on one.
>
>Bryan, on the plugin side, we should use whatever the component uses.
>
>Thanks
>
>Bosco
>
>
>
>
>On 4/20/16, 10:20 AM, "Ramesh Mani" <rm...@hortonworks.com> wrote:
>
>>Bryan,
>>
>>I have seen bothlog4j and slf4j being used in Ranger. Many of the new
>>codes uses slf4j.
>>
>>For Ranger admin ews/webapp/WEB-INF/log4j.xml is the right one and there
>>is xa_log_appender for ranger.
>>
>><category name="org.apache.ranger" additivity="false">
>>		<priority value="info" />
>>		<appender-ref ref="xa_log_appender" />
>>	</category>
>>
>>
>>Thanks,
>>Ramesh
>>
>>On 4/20/16, 10:09 AM, "Bryan Bende" <bb...@gmail.com> wrote:
>>
>>>Two questions regarding logging in Ranger...
>>>
>>>1) Should code running in Ranger use commons logging to get a logger?
>>	
>>>
>>>It appears log4j and slf4j are on the classpath, but most existing code
>>>seems to use commons logging, just wanted to confirm.
>>>
>>>2) Which logging configuration file does Ranger admin webapp use?
>>>
>>>I tried modifying ews/webapp/WEB-INF/log4j.xml and restarting the
>>>webapp,
>>>but didn't see any logging for my package.
>>>
>>>Thanks,
>>>
>>>Bryan
>>
>
>


Re: Logging in Ranger

Posted by Don Bosco Durai <bo...@apache.org>.
I thought there was a recent change to use log4j.properties. Not sure whether it was committed recently.

FYI, I have been using log4j for logging. But I agree, we should standardize on one.

Bryan, on the plugin side, we should use whatever the component uses.

Thanks

Bosco




On 4/20/16, 10:20 AM, "Ramesh Mani" <rm...@hortonworks.com> wrote:

>Bryan,
>
>I have seen bothlog4j and slf4j being used in Ranger. Many of the new
>codes uses slf4j.
>
>For Ranger admin ews/webapp/WEB-INF/log4j.xml is the right one and there
>is xa_log_appender for ranger.
>
><category name="org.apache.ranger" additivity="false">
>		<priority value="info" />
>		<appender-ref ref="xa_log_appender" />
>	</category>
>
>
>Thanks,
>Ramesh
>
>On 4/20/16, 10:09 AM, "Bryan Bende" <bb...@gmail.com> wrote:
>
>>Two questions regarding logging in Ranger...
>>
>>1) Should code running in Ranger use commons logging to get a logger?
>	
>>
>>It appears log4j and slf4j are on the classpath, but most existing code
>>seems to use commons logging, just wanted to confirm.
>>
>>2) Which logging configuration file does Ranger admin webapp use?
>>
>>I tried modifying ews/webapp/WEB-INF/log4j.xml and restarting the webapp,
>>but didn't see any logging for my package.
>>
>>Thanks,
>>
>>Bryan
>


Re: Logging in Ranger

Posted by Ramesh Mani <rm...@hortonworks.com>.
Bryan,

I have seen bothlog4j and slf4j being used in Ranger. Many of the new
codes uses slf4j.

For Ranger admin ews/webapp/WEB-INF/log4j.xml is the right one and there
is xa_log_appender for ranger.

<category name="org.apache.ranger" additivity="false">
		<priority value="info" />
		<appender-ref ref="xa_log_appender" />
	</category>


Thanks,
Ramesh

On 4/20/16, 10:09 AM, "Bryan Bende" <bb...@gmail.com> wrote:

>Two questions regarding logging in Ranger...
>
>1) Should code running in Ranger use commons logging to get a logger?
	
>
>It appears log4j and slf4j are on the classpath, but most existing code
>seems to use commons logging, just wanted to confirm.
>
>2) Which logging configuration file does Ranger admin webapp use?
>
>I tried modifying ews/webapp/WEB-INF/log4j.xml and restarting the webapp,
>but didn't see any logging for my package.
>
>Thanks,
>
>Bryan