You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the logdown module as my custom logger, which is one of winston-compatible loggers. This module provides a functionality to attach a tiny emoji and a custom prefix to every messages like below.
constlogger=require('logdown')('caporal:');logger.info('this is a test message');
ℹ caporal: this is a test message
problem
The problem is the custom logger attaches the meta data(i.e., emoji and prefix) into the help instructions as well. This is because the help.js utilizes program.logger object to print out the help instructions. So, when I set my custom logger, the help instructions are like below.
ℹ caporal:
caporal test 1.0.0
USAGE
solution idea
The logdown logger may be not the only one that has this problem. I think the help instruction message should be independent with custom logger because it's auto-generated by Caporal.js. How about just using the default console.log function to print out the help instructions?
Please let me know there is any point that I misunderstood or missed 👍
The text was updated successfully, but these errors were encountered:
yuhwan
changed the title
custom logger could affect the auto-generated help
Custom logger could affect the auto-generated help
Mar 16, 2017
background
I'm using the logdown module as my custom logger, which is one of winston-compatible loggers. This module provides a functionality to attach a tiny emoji and a custom prefix to every messages like below.
problem
The problem is the custom logger attaches the meta data(i.e., emoji and prefix) into the help instructions as well. This is because the help.js utilizes program.logger object to print out the help instructions. So, when I set my custom logger, the help instructions are like below.
solution idea
The logdown logger may be not the only one that has this problem. I think the help instruction message should be independent with custom logger because it's auto-generated by Caporal.js. How about just using the default console.log function to print out the help instructions?
Please let me know there is any point that I misunderstood or missed 👍
The text was updated successfully, but these errors were encountered: