# minlog
**Repository Path**: qiaoshouxing/minlog
## Basic Information
- **Project Name**: minlog
- **Description**: a simple c/c++ log
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 4
- **Created**: 2015-02-13
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
minlog
============================================
a simple c\c++ log
---
###编译
最低支持redhat(CentOS)5.X系统(kernel/2.6.18,gcc/4.1.2)
编译依赖cmake/2.8以上版本
```shell
cmake . #-DCMAKE_BUILD_TYPE=Release[Debug,...]
make
```
###示例
```cpp
minlog::init();
minlog::setlevel(minlog::console, minlog::debug_level);
minlog::setlevel(minlog::console, minlog::info_level);
minlog::setlevel(minlog::localfile, minlog::info_level);
minlog::instance()->debug("hello %s", "world");
minlog::instance()->info("hello %s", "world");
minlog::fini();
```
编译
```shell
cd test
cmake .
./test
```
自定义函数
```cpp
void mylog(const char* fmt, ...)
{
va_list va;
va_start(va, fmt);
minlog::instance()->debug(fmt, va);
va_end(va);
}
int main(int argc, char** argv)
{
//...
mylog("this is mylog interface, %d param", argc - 1);
//...
return 0;
}
```
###性能
实测多线程调用每秒百万级别以上,暂无与其他库对比效果
编译测试性能
```shell
cd benchmark
cmake .
make
./bench
```
###计划
Windows支持
支持配置(当前暂无配置,以小时分割文件)
支持稳定模式和急速模式配置(当前高并发导致内存占用高)
支持其他方式日志保存(如网络)
>OSC主页:[http://my.oschina.net/rangerlee](http://my.oschina.net/rangerlee)
>联系方式:[rangerlee@foxmail.com](mailto:rangerlee@foxmail.com)