Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined issue while logging from node-loggly-bulk library #11

Merged
merged 3 commits into from Jun 6, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

resolved TypeError

  • Loading branch information
Shweta Jain
Shweta Jain committed May 26, 2017
commit 7262038dd061e4a254c0e35f78231354945068c1
@@ -105,6 +105,15 @@ util.inherits(Loggly, events.EventEmitter);
// - http://www.loggly.com/docs/api-sending-data/
//
Loggly.prototype.log = function (msg, tags, callback) {

//
// typeof msg is string when we are sending logs using node-loggly-bulk.
// If we are sending logs using winston-loggly-bulk, msg is an object.
//
if (typeof(msg) === 'string') {
msg = { message: msg };
}

msg.message = truncateLargeMessage(msg.message)
if (!callback && typeof tags === 'function') {
callback = tags;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.