@adoyle.me/winston-logger
A wrapper of winston. For simple usage.
TOC
Installation
npm install -S @adoyle.me/winston-logger
Usage
import Factory from '@adoyle.me/winston-logger';
// const Factory = require('@adoyle.me/winston-logger');
const Logger = Factory.new();
// const Logger = Factory.new({
// files: [
// {
// level: 'error',
// filename: 'logs/error.log',
// },
// {
// level: 'debug',
// filename: 'logs/all.log',
// },
// ],
// console: false,
// });
const logger = Logger.create();
// const logger = Logger.create({label: 'xxx'});
// const logger = Logger.create({label: 'xxx', depth: null});
logger.debug('hahahah');
logger.info('hello %s', 'world');
logger.error('error= %O', {message: 'failed'});
Versioning
The versioning follows the rules of SemVer 2.0.0.
BUT, anything may have BREAKING CHANGES at ANY TIME when major version is zero (0.y.z), which is for initial development and the public API should be considered unstable.
When major version is zero, You should save it with prefix ~
.
For more information on SemVer, please visit http://semver.org/.
Copyright and License
Copyright (c) 2019 ADoyle. The project is licensed under the Apache License Version 2.0.
See the LICENSE file for the specific language governing permissions and limitations under the License.
See the NOTICE file distributed with this work for additional information regarding copyright ownership.