> On Feb. 26, 2016, 5:11 p.m., Matt wrote:
> > ambari-server/src/main/resources/common-services/PXF/3.0.0/package/alerts/api_status.py,
> >  line 72
> > <https://reviews.apache.org/r/44119/diff/1/?file=1272830#file1272830line72>
> >
> >     The log is common to all alerts which are run. It would be better to 
> > say which alert it is, for making debugging easier in the future.
> >     
> >     logger.info("[Alert PXF API]: getting delegation token from 
> > {0}".format(url))
> >     
> >     Consider other logger messages as well.
> 
> jun aoki wrote:
>     @Matt, I wonder if all callers of logger have to write where it is, it 
> would defeat the purpose of logger? The callers should only write level 
> (info, debug, warn) and what it wants to log. 
>     On the other hand, timestamp, py file name and possibly lines should be 
> logged by logger only when it is configured so? (also see log4j's "F" format)
>     Let me know if I'm totally mistaken here with python's logger.

Among a bunch of log messages, it would be easier to identify the message if it 
contained 'PXF' in the message: "Getting delegation token from <url> for PXF". 
At-least it makes it possible to grep for PXF in the ambari_alerts log and this 
would show up, without possibly thinking about enabling other log4j options 
(similar to the one you mentioned).

"Getting delegation token from <url>" can be for any alert defined in Ambari. 
grepping for PXF wouldn't return this line.


- Matt


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44119/#review121027
-----------------------------------------------------------


On Feb. 29, 2016, 6:10 p.m., jun aoki wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44119/
> -----------------------------------------------------------
> 
> (Updated Feb. 29, 2016, 6:10 p.m.)
> 
> 
> Review request for Ambari.
> 
> 
> Bugs: AMBARI-15211
>     https://issues.apache.org/jira/browse/AMBARI-15211
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Add alerts for PXF availability.
> The availability could be same as its service check. (by hitting the version 
> api)
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/resources/common-services/PXF/3.0.0/alerts.json 
> PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/alerts/api_status.py
>  PRE-CREATION 
>   ambari-server/src/test/python/stacks/2.3/PXF/test_alerts_api_status.py 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/44119/diff/
> 
> 
> Testing
> -------
> 
> Manually tested. 
> 
> 
> ----------------------------------------------------------------------
> Ran 275 tests in 6.876s
> 
> OK
> ----------------------------------------------------------------------
> Total run:924
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> jun aoki
> 
>

Reply via email to