diff options
| author | Stephen Blott | 2016-03-06 07:53:32 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2016-03-17 14:26:43 +0000 | 
| commit | 5bdf71a3c5b4c1a342c5c6bc644e8feea62d17b8 (patch) | |
| tree | 133954aa2a5293b37552323a2e4f69fe3937bec9 /background_scripts | |
| parent | a7cd51c8b4c6694ec66711535dbba4ba7a3b813b (diff) | |
| download | vimium-5bdf71a3c5b4c1a342c5c6bc644e8feea62d17b8.tar.bz2 | |
Logging; only show the time...
... we know what day it is!
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/bg_utils.coffee | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/background_scripts/bg_utils.coffee b/background_scripts/bg_utils.coffee index bff005ab..ca823247 100644 --- a/background_scripts/bg_utils.coffee +++ b/background_scripts/bg_utils.coffee @@ -65,6 +65,14 @@ BgUtils =            # Don't log messages from the logging page itself.  We do this check late because most of the time            # it's not needed.            if sender?.url != loggingPageUrl -            viewWindow.document.getElementById("log-text").value += "#{(new Date()).toISOString()}: #{message}\n" +            date = new Date +            [hours, minutes, seconds, milliseconds] = +              [date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()] +            minutes = "0" + minutes if minutes < 10 +            seconds = "0" + seconds if seconds < 10 +            milliseconds = "00" + milliseconds if milliseconds < 10 +            milliseconds = "0" + milliseconds if milliseconds < 100 +            dateString = "#{hours}:#{minutes}:#{seconds}.#{milliseconds}" +            viewWindow.document.getElementById("log-text").value += "#{dateString}: #{message}\n"  root.BgUtils = BgUtils | 
