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

Can not tag an error when passed to `.error` or `.info` function. #44

Closed
shahidcodes opened this issue Sep 5, 2018 · 1 comment
Closed

Comments

@shahidcodes
Copy link

@shahidcodes shahidcodes commented Sep 5, 2018

Error tags works when tags are passing when instantiating the transport

const options = {
  token: "85dc8260-d031-49be-a3a2-d48e47f97125",
  subdomain: "sub",
  tags: ['test tags']
  json: true
}

but not when when passed to .error or .info function.

Loggly.error(err, { tags: ['user_login'] })
// or
Loggly.error(err, ['user_login']);

I can see the code passes the tags array to underlying node-loggly-bulk but why it does'nt appear as tag in Loggly rather its appended in json as an extra property called meta

versions from package.json

{
"winston": "^2.4.1",
"winston-loggly-bulk": "^2.0.2",
}
@elfilip
Copy link

@elfilip elfilip commented Jan 10, 2019

I tested it on 3.x branch and it works. When I call:
logger.info("Hello World from Node.js! ",{ tags: ['user_login'] });
The tag shows in the list of tags in Loggly.

@alestrunda alestrunda closed this Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.