From ea7744a0da59d3033b1c02d6794142fb11ae0a0e Mon Sep 17 00:00:00 2001 From: "scottbyer@chromium.org" Date: Thu, 20 Oct 2011 19:34:43 +0000 Subject: More message names and some timing output for the IPC logging. With ANSI color if asked for. BUG=none TEST=none Review URL: http://codereview.chromium.org/8319023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106541 0039d316-1c4b-4281-b951-d872f2087c98 --- ipc/ipc_logging.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ipc/ipc_logging.h') diff --git a/ipc/ipc_logging.h b/ipc/ipc_logging.h index 42237c7..83b8590 100644 --- a/ipc/ipc_logging.h +++ b/ipc/ipc_logging.h @@ -85,6 +85,20 @@ class IPC_EXPORT Logging { } private: + typedef enum { + ANSI_COLOR_RESET = -1, + ANSI_COLOR_BLACK, + ANSI_COLOR_RED, + ANSI_COLOR_GREEN, + ANSI_COLOR_YELLOW, + ANSI_COLOR_BLUE, + ANSI_COLOR_MAGENTA, + ANSI_COLOR_CYAN, + ANSI_COLOR_WHITE + } ANSIColor; + const char* ANSIEscape(ANSIColor color); + ANSIColor DelayColor(double delay); + friend struct DefaultSingletonTraits; Logging(); @@ -93,6 +107,7 @@ class IPC_EXPORT Logging { bool enabled_; bool enabled_on_stderr_; // only used on POSIX for now + bool enabled_color_; // only used on POSIX for now std::vector queued_logs_; bool queue_invoke_later_pending_; -- cgit v1.1