
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
gulp-messenger
Advanced tools
View on npm
npm install gulp-messenger
var msg = require('gulp-messenger');
msg.init(); // initialize module, otherwise defaults will be used
// this example will enable file logging (see options below)
msg.init({logToFile: true});
// this will disable logging to file and interpolation variables will be font style as message (no bold)
var options = { logToFile: false, boldVariables: false };
msg.init(options);
// You can use titleCase or lower case for msg methods
msg.Info('-', 'Loading...', '*');
msg.log ('style: <%= name %>', {name: 'info'}); // default color White
msg.Info ('style: <%= name %>', {name: 'info'}); // default color Cyan
msg.Success('style: <%= name %>', {name: 'success'}); // default color Green
msg.Warning('style: <%= name %>', {name: 'warning'}); // default color Yellow
msg.Error ('style: <%= name %>', {name: 'error'}); // default color Red
msg.Note ('style: <%= name %>', {name: 'note'}); // default color Orange
msg.Time ('style: <%= name %>', {name: 'time'});
msg.Debug ('style: <%= name %>', {name: 'debug'});
msg.Table (array|object)
Default Options (supplied to init method)
var defOptions = {
logToFile: false,
logTimestampFormat: 'YYYY-MM-DD HH:mm:ss Z',
logToConsole: true,
logPath: 'logs/',
logFile: 'app.log',
timestamp: false,
rotateLog: false,
boldVariables: true,
useDumpForObjects: true
};
logToFile (default: false)
- will log the supplied message to `logger` instance and log to file
logToConsole (default: true)
- will log message to console
logTimestampFormat (default: YYYY-MM-DD HH:mm:ss Z)
- when logging to file, uses momentjs formats
logPath (default: 'logs/' at root level)
- desired path where log files will be stored
logFile (default: 'app.log')
- desired filename where log files will be stored
timestamp (default: false)
- Will include timestamp on consoled messages
rotateLog (default: false)
- will create a new log file each day
boldVariables (default: true)
- when perform interpolation, the actual variable will be bold
useDumpForObjects (default: true)
- when enabled, is passing a single object paramter, msg.dump() will be used instead of standard console output
- when disabled, native msg.xxx will be used (default colors, etc)
For example info
Use msg.info for each file into the stream
msg.Info('This information message logged to console and optionally log file. Configured by `options` parameter supplied to `msg.init` method');
msg.info('This information message logged to console and optionally log file. Configured by `options` parameter supplied to `msg.init` method');
or -
// If you using in gulp stream, include the `flush` property as shown here
// All messenger routines (except dump) are supported in the gulp pipleline
gulp.src('src/**/*')
.pipe(msg.flush.info('Piping Message')); // 'Piping Message' for each file
Use msg.flush.info at the and of the stream
gulp.src('src/**/*')
.pipe(msg.flush.info('Process Completed Successfully')); //'Process Completed Successfully' at the and of stream
Use msg.Info from the outside of the stream
msg.Info('Application Message'); //'Application Message' in node.js application
Returns current module version
Show message
Type: String
Delimiter before/after the message. Each character is repeated 80 times
msg.Info('--', 'Hello World', '*')
Type: Object
Data for message. Inherited values:
env - process.env file - vinyl file file.relative - relative path (extra field) file.basename - basename (extra field) duration - duration of streaming totalDuration - duration from gulpfile start
Type: String
Lodash compatible template (may also use Underscore over Lodash).
msg.Info('Environment: <%= env.NODE_ENV %>. Name: <%= name %>', {name: 'codedungeon'})
//Environment: dev. name: codedungeon
Copyright (c) 2015-2016 Mike Erickson Released under the MIT license
gulp-messenger written by Mike Erickson
E-Mail: codedungeon@gmail.com
Twitter: @codedungeon
Webiste: codedungeon.org
FAQs
Console/Gulp and File Logger
We found that gulp-messenger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.