Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

[proposal] Update sails.config.log.md #1297

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

OnbitShashan
Copy link

"npm i winston" now installs new Winston 3.x.x version. Making changes therefor users do not confuse with non working code

"npm i winston" now installs new Winston 3.x.x version. Making changes therefor users do not confuse with non working code
@sailsbot
Copy link
Collaborator

Hi @OnbitShashan! It looks like the title of your pull request doesn’t quite match our guidelines yet. Would you please edit your pull request's title so that it begins with [proposal], [patch], [fixes #<issue number>], [implements #<other PR number>], or [misc]? Once you've edited it, I'll take another look!

@OnbitShashan OnbitShashan changed the title Update sails.config.log.md [proposal] Update sails.config.log.md Jan 22, 2020
@sailsbot
Copy link
Collaborator

Thanks for submitting this pull request, @OnbitShashan! We'll look at it ASAP.

In the mean time, here are some ways you can help speed things along:

  • discuss this pull request with other contributors and get their feedback. (Reactions and comments can help us make better decisions, anticipate compatibility problems, and prevent bugs.)
  • ask another JavaScript developer to review the files changed in this pull request. (Peer reviews definitely don't guarantee perfection, but they help catch mistakes and enourage collaborative thinking. Code reviews are so useful that some open source projects require a minimum number of reviews before even considering a merge!)
  • if appropriate, ask your business to sponsor your pull request. (Open source is our passion, and our core maintainers volunteer many of their nights and weekends working on Sails. But you only get so many nights and weekends in life, and stuff gets done a lot faster when you can work on it during normal daylight hours.)
  • make sure you've answered the "why?" (Before we can review and merge a pull request, we feel it is important to fully understand the use case: the human reason these changes are important for you, your team, or your organization.)

Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly.

For help with questions about Sails, click here.

@abilash1104
Copy link

`var winston = require('winston');
var customLogger = winston.createLogger();
// A console transport logging debug and above.
customLogger.add(new winston.transports.Console, {
level: 'debug',
colorize: true
});
// A file based transport logging only errors formatted as json.
customLogger.add(new winston.transports.File({
level: 'error',
filename: 'filename.log',
format: winston.format.json(),
}));
module.exports.log = {
// Pass in our custom logger, and pass all log levels through.
custom: customLogger,
level: 'silly',

// Disable captain's log so it doesn't prefix or stringify our meta data.
inspect: false
};`
I tried the above code, but it gives TypeError: self._addDefaultMeta is not a function.
Can you please look into it and suggest some way to resolve the error. @OnbitShashan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants