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

LOG-8039 update packages #59

Merged
merged 18 commits into from Apr 6, 2020

code cleaning

  • Loading branch information
alestrunda committed Mar 31, 2020
commit efb5a49686c70f4d3fecfd86daee29e91309f0f7
@@ -113,26 +113,25 @@ const validateMetadata = meta => {
// Core logging method exposed to Winston. Metadata is optional.
//
Loggly.prototype.log = function(meta, callback) {
const message = validateMetadata(meta);
const data = validateMetadata(meta);

if (this.silent) {
return callback(null, true);
}

if (this.timestamp && !message.timestamp) {
message.timestamp = new Date().toISOString();
if (this.timestamp && !data.timestamp) {
data.timestamp = new Date().toISOString();
}

if (this.stripColors) {
message.message = ('' + message.message).replace(code, '');
data.message = ('' + data.message).replace(code, '');
}

const splats = message[Symbol.for("splat")];

const splats = data[Symbol.for('splat')];
if (splats && splats.length > 0) {
message.details = splats;
data.details = splats;
}

const self = this;

//
@@ -143,9 +142,10 @@ Loggly.prototype.log = function(meta, callback) {
callback && callback(err, result);
}

const result = (meta && meta.tags)
? this.client.log(message, meta.tags, logged)
: this.client.log(message, logged);
const result =
data && data.tags
? this.client.log(data, data.tags, logged)
: this.client.log(data, logged);

return result;
};
@@ -28,8 +28,8 @@
"winston"
],
"dependencies": {
"node-loggly-bulk": "^2.2.4",
"clone": "^2.1.2",
"node-loggly-bulk": "^2.2.4",
"winston": "^3.2",
"winston-transport": "^4.3.0"
This conversation was marked as resolved by michal-bures

This comment has been minimized.

@michal-bures

michal-bures Mar 26, 2020

These two should really really be in peer dependencies, we shouldn't force users to use our chosen version of winston... But moving it there can break stuff for existing users which will now have to add the winston dependency manually... Let's make a separate task for that.

This comment has been minimized.

},
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.