> On May 28, 2014, 2:49 p.m., David McLaughlin wrote:
> > I don't have all the context, but it seems unusual to me to add a log level 
> > for this use case. Can you explain a little why this is needed?
> 
> Mark Chu-Carroll wrote:
>     Sure. We're trying to create a centralized logging/analytics service to 
> gather information about how users interact with the client.
>     
>     Originally, I used "INFO" level for the logs that need to go to the 
> server. But since we now want to make the clientv2 show the same INFO logs as 
> v1, that's no good. There's a lot of stuff that will go to the analytics 
> server, but which we really don't want to show to users, because it'll annoy 
> them.
>     
>     But it's not debugging information: we don't want every debug message 
> that we put in to find bugs to spam the analytics server. 
>     
>     So we need something in between INFO and DEBUG.
>
> 
> David McLaughlin wrote:
>     Did you consider a separate logger instance for analytics collection? 
> This is normally how I've seen this type of thing done.. although that 
> doesn't necessarily mean it's better than custom log levels :)

Considered, yes. But there are also lots of things that really belong in both 
places - most of the stuff that goes to info really should also wind up in the 
analytics logs.  A log level seemed like the best solution.


- Mark


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


On May 28, 2014, 12:02 p.m., Mark Chu-Carroll wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21980/
> -----------------------------------------------------------
> 
> (Updated May 28, 2014, 12:02 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Bill Farner.
> 
> 
> Bugs: aurora-473
>     https://issues.apache.org/jira/browse/aurora-473
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Fix client logging.
> 
> - Make client print logs at levels INFO and greater to stderr instead
>   of discarding.
> - Add a clean log printer.
> - Add a log level to differentiate between log messages that should be
>   shown to user, and logs that should be sent to a distributed log
>   transcript.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/cli/BUILD 
> 015345ea8e5d4a9107707f6ef0c82344596aae8e 
>   src/main/python/apache/aurora/client/cli/__init__.py 
> bd9ea67dc5b5a969abb06bcb449b1d36035a738c 
>   src/main/python/apache/aurora/client/cli/client.py 
> 12e7bcf9b64c0ee11f5ce3937bc470dda55290f6 
>   src/main/python/apache/aurora/client/cli/logsetup.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/21980/diff/
> 
> 
> Testing
> -------
> 
> Partial transcript of end-to-end test:
> 
> {noformat}
> + test 200 == 200
> + echo '== Updating test job'
> == Updating test job
> + vagrant ssh -c 'aurora2 job update devcluster/vagrant/test/http_example 
> /vagrant/src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora'
> log(info): Updating job: http_example
> log(info): Starting job update.
> log(info): Examining instances: [0]
> log(info): Killing instances: [0]
> log(info): Instances killed
> log(info): Adding instances: [0]
> log(info): Instances added
> log(info): Watching instances: [0]
> {noformat}
> 
> 
> Thanks,
> 
> Mark Chu-Carroll
> 
>

Reply via email to