Skip to content

Conversation

@felixmc
Copy link

@felixmc felixmc commented Mar 2, 2015

See issue #14 EDIT: Moved to sails#4036.

These changes create the following behavior (I made sure to test each scenario described below):

Without a custom logger, everything should work the same, except that it only sets the default prefix if options.prefix is not false or null.

With a custom logger and no prefix defined, no prefixes are set and relies on the custom logger to handle its on prefixes (probably preferred behavior with most custom loggers).

With a custom logger and options.prefix defined to true it adds the default prefixes before passing the message to the custom logger (this option might result in duplicate prefixes like described in the issue if the custom logger has its own prefixes, but it would be useful if the custom logger did not have it's own prefixes).

With a custom logger and options.prefix is defined as a string, the string prefix is prepended to the message sent to the custom logger.

@Globegitter
Copy link
Member

@felixmc is it possible to add a test for that scenario?

@RWOverdijk
Copy link

👍

@mikermcneil
Copy link
Member

mikermcneil commented Dec 9, 2016

@RWOverdijk see balderdashy/sails#4036 (comment) for more recent discussion on it

@mikermcneil
Copy link
Member

mikermcneil commented Mar 10, 2017

Update: I'm leaving this open pending balderdashy/sails#4036 (comment). If anyone would like to do that, please go ahead!

@mikermcneil mikermcneil changed the title Fix for issue #14 (fixing log prefix with custom logger) [patch] Allow log prefixes to be properly disabled when using custom logger Mar 10, 2017
@luislobo
Copy link
Contributor

@mikermcneil I think this one was pending a change in sails-docs that is already done. Probably can be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants