# HCLogger

HCLogger is born from the React Native community's need for log message into file based on Typescript.

 
## 功能

* 拥有和 ```console.log``` 相同的 log format
* 将内容 log 进文件中，方便debug
* log level 分为 'file', 'error', 'warn', 'info', 'debug'。在 'Release' 模式下，'file', 'error' 两个 level 有效，其他 level 失效。
* emoji 表式：

```bash
file  == 📚
error == 🚨
warn  == ⚠️
info  == ✏️
debug == 🐝
```

## Installation

Since the library is a typescript solution, to install the latest version of hclogger you only need to run:

```bash
npm install hclogger
```

##iOS

Use cocoapods install the native module.

```bash
pod 'HCLogger',:path =>"../node_modules/hclogger/HCLogger.podspec"
```
## File logger configure

* 按时间长度来拆分文件，默认是每 24h 拆分一次文件，时长可配置
* 单个文件的大小默认是 5MB，大小可配置
* 文件个数不超过 20 个，个数可配置 
* 添加rollLogFile 接口 ，可以停止在当前文件log，新建一个新的文件进行 log  

## License

hclogger is licensed under the [MIT License](http://git.hz.zerozero.cn/app/HCLogger/blob/develop/LICENSE).
