Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Colourful logging in node.js
This version is a rework of the original library with two new main features:
npm install coolog
var coolog = require('coolog')
, logger = coolog.logger('main.js', 'root');
logger.log('Message or obj', ...);
logger.error('Message or obj', ...);
logger.warn('Message or obj', ...);
logger.info('Message or obj', ...);
logger.debug('Message or obj', ...);
logger.ok('Message or obj', ...);
Coolog need a settings file named coolog.json in the root directory. This file defines the channels and the appenders settings. This file must contains at least the root channel options. See test/coolog.json file for more info.
coolog.logger(filename, channel);
This method create a new logger.
Developers can create custom appenders.
In coolog an appender is just a module that exports a function
module.exports = function (settings) {
}
settings
is a variable which contains the options specified by the user in the coolog.json file.
The function should export an object with a log
method.
The method should has this sign
function (level_name, channel_name, filename, args)
Coolog offer a keychan object to add some parameters for the appender that you don't want to put in the config file (eg: a log web service api key)
var coolog = require('coolog');
coolog.keychan['appender-name'] = {
'key': process.env.KEY
};
Copyright (c) 2013 PlasticPanda.com, Mauro Bolis mauro@plasticpanda.com, Simone Lusenti simone@plasticpanda.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WIT
FAQs
Colorful logging in NodeJS.
The npm package coolog receives a total of 12 weekly downloads. As such, coolog popularity was classified as not popular.
We found that coolog 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.