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

Issue 330933004: Mojo: Add basic logging facilities to environment. (Closed)

Created:
6 years, 6 months ago by viettrungluu
Modified:
6 years, 6 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, ben+mojo_chromium.org
Project:
chromium
Visibility:
Public.

Description

Mojo: Add basic logging facilities to environment. I'll add nicer logging macros separately. Also to do: We should also build mojo_public_environment_unittests against mojo_environment_chromium (to test the "chromium" implementation). I tried this manually (on a shared library build), and the LoggerTests pass but the AsyncWaiterTests blow up. R=darin@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=277189

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -9 lines) Patch
A + mojo/environment/default_logger.cc View 1 chunk +4 lines, -4 lines 0 comments Download
A + mojo/environment/default_logger_impl.h View 1 chunk +5 lines, -5 lines 0 comments Download
A mojo/environment/default_logger_impl.cc View 1 chunk +46 lines, -0 lines 1 comment Download
M mojo/mojo.gyp View 2 chunks +3 lines, -0 lines 0 comments Download
M mojo/mojo_public.gypi View 2 chunks +5 lines, -0 lines 0 comments Download
A mojo/public/c/environment/logger.h View 1 chunk +32 lines, -0 lines 1 comment Download
A mojo/public/cpp/environment/default_logger.h View 1 chunk +17 lines, -0 lines 0 comments Download
A mojo/public/cpp/environment/lib/default_logger.cc View 1 chunk +47 lines, -0 lines 1 comment Download
A mojo/public/cpp/environment/tests/logger_unittest.cc View 1 chunk +29 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
viettrungluu
6 years, 6 months ago (2014-06-13 23:59:59 UTC) #1
darin (slow to review)
LGTM w/ some suggestions: https://codereview.chromium.org/330933004/diff/1/mojo/environment/default_logger_impl.cc File mojo/environment/default_logger_impl.cc (right): https://codereview.chromium.org/330933004/diff/1/mojo/environment/default_logger_impl.cc#newcode31 mojo/environment/default_logger_impl.cc:31: logging::LogMessage(__FILE__, __LINE__, it seems like ...
6 years, 6 months ago (2014-06-14 06:08:24 UTC) #2
viettrungluu
Committed patchset #1 manually as r277189.
6 years, 6 months ago (2014-06-14 07:24:38 UTC) #3
darin (slow to review)
On 2014/06/14 at 07:24:38, viettrungluu wrote: > Committed patchset #1 manually as r277189. Looks like ...
6 years, 6 months ago (2014-06-17 00:00:55 UTC) #4
viettrungluu
On 2014/06/17 00:00:55, darin wrote: > On 2014/06/14 at 07:24:38, viettrungluu wrote: > > Committed ...
6 years, 6 months ago (2014-06-17 00:26:06 UTC) #5
viettrungluu
6 years, 6 months ago (2014-06-17 16:47:11 UTC) #6
Message was sent while issue was closed.
On 2014/06/17 00:26:06, viettrungluu wrote:
> On 2014/06/17 00:00:55, darin wrote:
> > On 2014/06/14 at 07:24:38, viettrungluu wrote:
> > > Committed patchset #1 manually as r277189.
> > 
> > Looks like what was committed didn't reflect any of the suggestions from
> above.
> > Was that intended? Maybe the MOJO_LOG_LEVEL_VERBOSE #define is needed at
> > minimum.
> 
> Gah, I totally didn't see your comments. Sorry about that. Replies to what you
> wrote:
> 
> 1) I don't want to add file/line number parameters because I think this should
> be a potential frontend to a general-purpose logging facility (for which
> file/lineno often don't make sense); e.g., at some point, it'd be nice to be
> able to hook this logging library through to a Mojo logging service.
> 
> So in a sense it's the "lowest-level" thing needed for a logger. It should be
> more JS's console.log or Android's android.util.Log. Having to plumb through
an
> extra string + int is a bit odd. (My plan is to have the logging headers,
which
> define macros, etc., deal with the file/lineno. This is, admittedly,
> inconvenient for plumbing through to Chromium's logging facility.)
> 
> 2) Probably, I should remove MOJO_LOG_LEVEL_VERBOSE.... (The Chromium-like
thing
> to do is to access them via VLOG, etc. You can't do, e.g., LOG(VERBOSE), so I
> won't need the constants/defines for token pasting purposes.)

Ha, I'm totally wrong. base/logging.h *does* have "verbose". I guess I should
add it to the C side then.

> 
> 3) I'll add the space.

Powered by Google App Engine
This is Rietveld 408576698