mixu / minilog

Lightweight client & server-side logging with Stream-API backends
http://mixu.net/minilog/
Other
382 stars 51 forks source link

Probem with Minilog & formatters in the Browser #11

Open nevf opened 11 years ago

nevf commented 11 years ago

I'm trying to setup Minilog to use in the Browser as follows:

    Minilog
      .pipe(Minilog.suggest)                  // filter
      .pipe(Minilog.backends.browser.color)   // also tried .formatColor
      .pipe(Minilog.backends.browser);        // backend

and get:

Uncaught TypeError: Cannot call method 'emit' of undefined   minilog.js:15

If I leave the above code out I do get basic minilog working ok. I am loading minilog using require.js in case that is relevant.

harriha commented 8 years ago

Bumped into the same thing. If there's an inconsistency between browser vs node implementations which shouldn't be there, would be great to have a fix for that. Otherwise, if the implementations are different on purpose, the documentation could be improved to clarify this.