Skip to content

Commit

Permalink
Fix rfc5424 loggers in browser
Browse files Browse the repository at this point in the history
Fix rfc5424() to correctly bind console.* methods to console object
itself, because console methods require `this = console` in some older
browsers.
  • Loading branch information
bajtos committed Jan 31, 2017
1 parent 58e5df1 commit 6350937
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion browser.js
Expand Up @@ -65,7 +65,7 @@ StrongGlobalize.prototype.owrite = function() {
StrongGlobalize.prototype.write = StrongGlobalize.prototype.owrite;

function rfc5424(type, args, fn) {
return fn.apply(null, [type, ': '].concat(args));
return fn.apply(console, [type, ': '].concat(args));
}
// RFC 5424 Syslog Message Severities
StrongGlobalize.prototype.emergency = function() {
Expand Down

0 comments on commit 6350937

Please sign in to comment.