Closed vidraj closed 4 years ago
This error started happening when logging was switched from using goog.log/log
to calling .logRecord
directly. goog.log/log
contains explicit checks to prevent this. I'll send a pull request.
When I set
goog.debug.LOGGING_ENABLED
to true, the error disappears. But curiously enough, the logs still don't show up (I would expect logging to work with this define set).
That was my fault, my application had the setup code, which calls glogi.console/install!
and sets the levels, conditionalized on goog.DEBUG
. After changing the conditional to depend on goog.debug.LOGGING_ENABLED
, logging in production works as expected.
In Glögi 1.0-47, when compiled with advanced optimizations, the logging functions throw null dereference TypeErrors. It is hard to pin down the exact source because of the minification, but I suspect that it is because the
goog.log/getLogger
function returns null inglogi/logger
, so.logRecord
is called on null inglogi/log
. It used to work fine with Glögi 0.0-25 (by which I mean that there was no logging and no error).When I set
goog.debug.LOGGING_ENABLED
to true, the error disappears. But curiously enough, the logs still don't show up (I would expect logging to work with this define set).Does it behave the same way for you? Maybe I'm just doing something funny elsewhere in my program.