graphicore/ufoJS — pull request #16 by monkeyiq (2014-09-20 11:45:16+00:00)
Title: issue144: using winston to keep the code impact more local.

The ufoJS code now uses a misc.logger to tell when bad things happen during the load. This removes the passing of callbacks down the function chain.

The default ufoJS is to rethrow the exception case that was passed to logger. This should give the same behaviour as before the PR. Notice that in makeRethrowLogger() he original meta.err is thrown, so the stack trace should look as one would expect.

Code like MP can patch the misc.logger to their own logger (which I have a separate PR todo) and thus record failures and allow the program to continue loading.

If this looks like a solution that might be merged then I'll do more testing on it than the few runs so far.
This replaces https://github.com/graphicore/ufoJS/pull/12.

One downside to the current code is that the logger is ufoJS wide. It would be nice to be able to patch the logger on a GlyphSet basis and leave other GlyphSets using the unpatched logger instance.