Commit Graph

65 Commits

Author SHA1 Message Date
Slava Kim
ff81c5fa83 Colorful logging for android and ios 2014-08-11 20:18:20 -07:00
Matthew Arbesfeld
0c062381ee Logging for Android 2014-08-11 18:05:39 -07:00
David Glasser
0da301c637 unbreak tests again 2014-07-01 13:33:39 -07:00
Emily Stark
1beb5ffe09 Fix Log._getCallerDetails() regex.
1. Now it matches `logging:test`, not `logging:tests`.
2. Now it is okay with server-side source maps, by matching
`/packages/logging/foo.js` in addition to `/packages/logging.js`.
2014-06-24 15:12:33 -07:00
Naomi Seyfer
7a5892bab0 Do not spend the effort on a stack trace if omitCallerDetails is set 2014-01-16 16:09:58 -08:00
Slava Kim
9fefc349e0 Make 'satellite' a special key in logging 2013-12-09 13:56:04 -08:00
Slava Kim
7c036de1e4 Fix date stamp in logs. 2013-11-03 22:21:35 -08:00
David Glasser
dba5933651 Change package/slice separator in various places to colon from dot.
Allow dots in package names.

Change the internal representation of "package specs" inside Slice to be a
{package,slice} object instead of a "spec" string.

library.getSlices now can take EITHER a "spec" string or a {package,slice}
object.

Linker-created slice files also separate the slice name with a colon (so eg, you
get URLs like "/packages/livedata:tests.js" when running package tests).  (Maybe
this should use a subdirectory instead?)
2013-08-12 18:05:34 -07:00
David Glasser
063c446263 Put a space after the "this timestamp isn't actually from the Log call" question
mark.
2013-08-02 16:29:10 -07:00
David Glasser
9f38258b54 Drop all @export lines. Add api.exportSymbol instead. 2013-07-25 18:54:40 -07:00
David Glasser
81e456ae81 Improve log lines file naming on server.
We avoid using Error.prepareStackTrace (which the node source map support also
uses) and do some hacky regexp parsing instead. This way, on the server, we get
the filename/line numbers after source map processing.

On the client we continue to get the compiled version... I guess because source
maps are implemented in the developer tools, not directly into the Error object.

(Probably should have gotten parseStack from tools/buildmessage.js instead.)

unbreaks _getCallerDetails tests.
2013-07-12 10:11:31 -07:00
Avital Oliver
f471d0eaa9 Add Log._suppress for spammy logs from tests 2013-07-09 21:52:38 -07:00
David Glasser
760289a437 More logging color tweaks.
Yellow looks bad on white, and blue looks meh on black. So stop coloring info
lines, stop using yellow, and only use blue for the header part.
2013-06-18 09:51:00 -07:00
Avital Oliver
7406c73b2a logging: small bugfix 2013-06-17 14:26:21 -07:00
Slava Kim
fefd11493f Add comment to _intercepted() function of logging package. 2013-06-17 11:48:28 -07:00
Slava Kim
4c88ed45f7 Imrove comments, clean intercept counter in logging package at the same
place we reset the intercepted array.
2013-06-17 11:37:26 -07:00
Slava Kim
422edbd4d9 Change the error message. 2013-06-17 11:29:40 -07:00
Slava Kim
a41573f59f Convert dates and regexps to string, test these and some other
non-standard values. Tests will probably fail on IE5-7 :(.
2013-06-12 19:01:12 -07:00
Slava Kim
bcbd6e1b70 Make sure that 'message' of log object is always a string. Teach Log to
log falsy values. Throw an exception if use passed non-string as part of
log object. Tests for this functionality.
2013-06-12 18:08:34 -07:00
Avital Oliver
e682c97977 Include offset from UTC in formatted log strings 2013-06-03 10:41:12 -07:00
Slava Kim
51db0d2646 Test logging from evaled string. 2013-05-31 16:21:57 -07:00
Slava Kim
0665b33d4f Pass logging tests on IE7. 2013-05-31 10:52:58 -07:00
Slava Kim
fc3a5c14d1 Get stack trace in FF. 2013-05-29 18:08:44 -07:00
Slava Kim
31e742e745 Use v8 js trace stack API for logging.
Rather than parsing formatted stack trace.
2013-05-29 15:29:10 -07:00
Avital Oliver
34157ebce4 minor tweaks to log format 2013-05-29 14:10:29 -07:00
Slava Kim
48c1b9bb48 Fix getting file name from url, adjust tests. 2013-05-29 13:40:06 -07:00
Slava Kim
5596dcf40f Make getCallerDetails public, add tests. 2013-05-29 12:39:21 -07:00
Slava Kim
410c5722bf Adjust whitespace, new tests for logging.format. 2013-05-29 12:30:41 -07:00
Slava Kim
a3447577ec Adjust white space and old tests in logging. 2013-05-29 12:30:31 -07:00
Avital Oliver
50bd0ab0bc logging: add stderr indicator 2013-05-29 11:31:39 -07:00
Avital Oliver
35363b4516 minor brush-up 2013-05-28 20:18:54 -07:00
Avital Oliver
cc4c762afb logging: 'stderr' is a reserved key 2013-05-28 19:41:30 -07:00
Slava Kim
8703e5d99a Log program name with other source information. 2013-05-28 16:33:46 -07:00
Slava Kim
00d4bd1ab5 Separate RESTRICTED and FORMATTED keys, pass app name to proxy. 2013-05-28 15:02:21 -07:00
Slava Kim
1651ecbbd6 Logging 'originApp' field if it differs from 'app' 2013-05-24 16:22:43 -07:00
Slava Kim
9234205af3 Simplify the prettify method. 2013-05-24 15:39:37 -07:00
Slava Kim
e3a33ec0dd Rename 'fileName' field to 'file'. 2013-05-24 15:13:28 -07:00
Slava Kim
9631221336 Rename infoPrefix since it is confusing. 2013-05-24 15:09:04 -07:00
Slava Kim
82c6efb5dd Remove RESERVED_KEYS since they duplicate existing constant. 2013-05-24 15:07:20 -07:00
Slava Kim
359464c97b Logs' fileds like app, fileName, line are formatted and colored. 2013-05-23 16:14:20 -07:00
Slava Kim
8098dbdc03 Make line number a number and add comments. 2013-05-23 13:43:50 -07:00
Slava Kim
bab43785d8 Fix comment. 2013-05-23 12:16:13 -07:00
Slava Kim
8db6438fb5 Log methods add file name and line number. 2013-05-23 12:11:21 -07:00
Emily Stark
92406c1e3e Add objFromText to Log object because it's used from satellite 2013-05-22 17:36:08 -07:00
Slava Kim
f6f69abd0b Remove one-time methods, split printColorfullyTextOrJSON 2013-05-22 16:36:10 -07:00
Slava Kim
6773112254 Print stderr with colors. 2013-05-22 15:22:01 -07:00
Slava Kim
3daf6a733b Improve 'Log.printColorfullyFromTextOrJSON' method 2013-05-22 14:08:28 -07:00
Slava Kim
1be18e2538 Fix indentation, add comments. 2013-05-22 13:22:07 -07:00
Slava Kim
77092dfe1d Add method that prints object and falls back to printing string. 2013-05-22 11:43:57 -07:00
David Glasser
560302954b Change logging colors. cyan is too hard to read on white background. 2013-05-21 18:03:41 -07:00