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

Unified Diff: impl/prod/everything_test.go

Issue 1542263003: Use prod logger's user context to read logging level (Closed) Base URL: https://github.com/luci/gae.git@nil_memcache
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | impl/prod/logger.go » ('j') | impl/prod/logger.go » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/everything_test.go
diff --git a/impl/prod/everything_test.go b/impl/prod/everything_test.go
index d94a7ecb572dec15ea395032fc847d2e61fc2b61..867c6d72dbc6e5f693e109cfc90983b67f9087d6 100644
--- a/impl/prod/everything_test.go
+++ b/impl/prod/everything_test.go
@@ -56,9 +56,16 @@ func TestBasicDatastore(t *testing.T) {
mc := memcache.Get(ctx)
inf := info.Get(ctx)
- // You have to visually confirm that this actually happens in the stdout
- // of the test... yeah I know.
- logging.Infof(ctx, "I am a banana")
+ Convey("logging allows you to tweak the level", func() {
+ // You have to visually confirm that this actually happens in the stdout
+ // of the test... yeah I know.
+ logging.Debugf(ctx, "SHOULD NOT SEE")
+ logging.Infof(ctx, "SHOULD SEE")
+
+ ctx = logging.SetLevel(ctx, logging.Debug)
+ logging.Debugf(ctx, "SHOULD SEE")
+ logging.Infof(ctx, "SHOULD SEE (2)")
+ })
Convey("Can probe/change Namespace", func() {
So(inf.GetNamespace(), ShouldEqual, "")
« no previous file with comments | « no previous file | impl/prod/logger.go » ('j') | impl/prod/logger.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698