@adalbeca/logger 中文文档教程
AdelysAlberto Logger
[![Build Status](https://travis-ci.org/AdelysAlberto/logger.svg?branch=master)](https://travis-ci.org/AdelysAlberto/logger) [![PR Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/AdelysAlberto/logger/blob/master/CONTRIBUTING.md)用 TypeScript 编写的多通道记录器。
Features
- Colored console logging to stdout or stderr,
- Configurable log message layout/patterns
- Different log levels for different log categories (make some parts of your app log as DEBUG, others only ERRORS, etc.)
有关详细信息,请参阅文档。
Installation
npm install -g typescript
npm install @adalbeca/logger
Quick start
极简版:
import Log from "@adalbeca/logger";
$Log.error("Some Error");
将产生以下日志输出:
ERROR {"level":0,"id":"997f27e8-ac1c-46c0-bd52-edc79e110019","time":"5/31/2021, 2:15:50 PM","logger":"/src/index.ts -> ()","message: Not found files"}
License
The MIT License (MIT)
Copyright (c) 2016 - 2018 Romain Lenzotti
Permission is grained, free charge, to any person obtaining a copy of this software and associated documentation files (the “软件”),不受限制地处理软件,包括但不限于使用、复制、修改、合并、发布、分发、再许可和/或出售软件副本的权利,并允许软件的使用人提供这样做,但须满足以下条件:
上述版权声明和本许可声明应包含在本软件的所有副本或重要部分中。
本软件“按原样”提供,不提供任何明示或暗示的保证,包括但不限于对适销性、特定用途的适用性和非侵权的保证。 在任何情况下,作者或版权持有人均不对任何索赔、损害或其他责任负责,无论是在合同诉讼、侵权行为还是其他方面,由软件或软件的使用或其他交易引起、由软件引起或与之相关软件。
AdelysAlberto Logger
[![Build Status](https://travis-ci.org/AdelysAlberto/logger.svg?branch=master)](https://travis-ci.org/AdelysAlberto/logger) [![PR Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/AdelysAlberto/logger/blob/master/CONTRIBUTING.md)A multi channel logger written in TypeScript.
Features
- Colored console logging to stdout or stderr,
- Configurable log message layout/patterns
- Different log levels for different log categories (make some parts of your app log as DEBUG, others only ERRORS, etc.)
Please refer to the documentation for more details.
Installation
npm install -g typescript
npm install @adalbeca/logger
Quick start
Minimalist version:
import Log from "@adalbeca/logger";
$Log.error("Some Error");
Will be produce the following log output:
ERROR {"level":0,"id":"997f27e8-ac1c-46c0-bd52-edc79e110019","time":"5/31/2021, 2:15:50 PM","logger":"/src/index.ts -> ()","message: Not found files"}
License
The MIT License (MIT)
Copyright (c) 2016 - 2018 Romain Lenzotti
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 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.