Last active
August 29, 2015 14:21
-
-
Save MiguelCastillo/3c83c83159b5af2ec5a2 to your computer and use it in GitHub Desktop.
sample default Logger stream and serializer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bitloader.Logger.default.enable(); | |
Bitloader.Logger.default.stream = { | |
write: function(buffer) { | |
console.log(buffer); | |
} | |
}; | |
Bitloader.Logger.default.serialize = function(packet) { | |
return JSON.stringify({ | |
name: packet.name, | |
hostname: "localhost", | |
pid: 1, | |
level: 3, | |
msg: JSON.stringify(packet.data), | |
time: packet.date, | |
v: 0 | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment