Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Issue 6404003: Silence testserver logs when tests are run in non-verbose mode (Closed)

Created:
9 years, 11 months ago by Raghu Simha
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ncarter (slow), idana, cbentzel+watch_chromium.org, darin-cc_chromium.org, pam+watch_chromium.org, tim (not reviewing)
Visibility:
Public.

Description

Silence testserver logs when tests are run in non-verbose mode The console output from testserver.py, chromiumsync.py and xmppserver.py during sync integration test runs is pretty chatty, and could do with being disabled by default. In addition, testserver.py spits out logs for non-sync tests even when the tests are run in non-verbose mode. This patch adds a switch to testserver.py called "log-to-console", and ties it up to the logging level returned by logging::GetMinLogLevel(). This way, testserver logs are printed on the console (in addition to being written to testserver.log) when tests are run in verbose mode. However, when tests are run in non-verbose mode, testserver logs are only written to the log file, but not to the console. BUG=71241 TEST=sync_integration_tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=73330

Patch Set 1 #

Total comments: 2

Patch Set 2 : Take 2. Use GetMinLogLevel instead of a separate flag. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -1 line) Patch
M net/test/test_server.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M net/tools/testserver/testserver.py View 1 2 chunks +9 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Raghu Simha
Fred, I've taken a first stab at making the integration test logss less chatty. Let ...
9 years, 11 months ago (2011-01-29 00:29:58 UTC) #1
Paweł Hajdan Jr.
http://codereview.chromium.org/6404003/diff/1/net/test/test_server.h File net/test/test_server.h (right): http://codereview.chromium.org/6404003/diff/1/net/test/test_server.h#newcode119 net/test/test_server.h:119: void SetConsoleLogging(bool log_to_console) { Please don't add new setters ...
9 years, 10 months ago (2011-01-29 10:26:24 UTC) #2
Raghu Simha
http://codereview.chromium.org/6404003/diff/1/net/test/test_server.h File net/test/test_server.h (right): http://codereview.chromium.org/6404003/diff/1/net/test/test_server.h#newcode119 net/test/test_server.h:119: void SetConsoleLogging(bool log_to_console) { On 2011/01/29 10:26:24, Paweł Hajdan ...
9 years, 10 months ago (2011-01-29 10:50:38 UTC) #3
Paweł Hajdan Jr.
The best option seems to use the TYPE_SYNC ctor argument, and append your command-line flag ...
9 years, 10 months ago (2011-01-29 11:27:03 UTC) #4
Raghu Simha
On 2011/01/29 11:27:03, Paweł Hajdan Jr. wrote: > The best option seems to use the ...
9 years, 10 months ago (2011-01-31 19:30:04 UTC) #5
Paweł Hajdan Jr.
Will that turn off logs for all tests? If non-sync tests still print the logs ...
9 years, 10 months ago (2011-01-31 20:43:54 UTC) #6
Raghu Simha
On 2011/01/31 20:43:54, Paweł Hajdan Jr. wrote: > Will that turn off logs for all ...
9 years, 10 months ago (2011-01-31 21:21:47 UTC) #7
Paweł Hajdan Jr.
On 2011/01/31 21:21:47, rsimha wrote: > Is there a reason you want to special-case TYPE_SYNC ...
9 years, 10 months ago (2011-02-01 07:49:59 UTC) #8
akalin
9 years, 10 months ago (2011-02-01 21:31:38 UTC) #9
LGTM

On 2011/02/01 07:49:59, Paweł Hajdan Jr. wrote:
> On 2011/01/31 21:21:47, rsimha wrote:
> > Is there a reason you want to special-case TYPE_SYNC here? Isn't it a good
> thing
> > for testserver.py's logs to appear on the console when chromium logs are
> > enabled, and to be silenced when chromium logs are disabled?
> 
> I remember various issues and inconsistencies with chromium logging (e.g. on
> Windows levels below ERROR used to be only printed to file and not console,
> etc). The testserver logs may be useful to eradicate test server flakiness,
and
> I want to be sure they are available when they are needed.
> 
> If you want to have a different behavior for sync tests, I'm fine with that
> (they make a lot more requests so that's indeed noisy), hence the special
case.
> 
> > Here's how this patch works:
> 
> Looking at those links it seems both print testserver output, which is good,
but
> it might change in the future.

Powered by Google App Engine
This is Rietveld 408576698