Coder Social home page Coder Social logo

nanolog's Introduction

一个header only的c++ 日志库

背景

NanoLog是一个非常小巧的log库,代码很少,不到一千行,速度比spdlog还快,应用上也能满足需求,我很喜欢。但是也存在一些不足,比如日志文件的数量没有限制,每次重启之后会从头开始写等等问题,还需要进一步完善。于是我新建了一个工程nanolog,这个工程继承于nanolog,将原工程改成header only,并用了一些最新的特性来简化原来的代码。

快速示例

#include "nanolog.hpp"

nanolog::initialize(nanolog::GuaranteedLogger(), "/tmp/", "nanolog", 1);
LOG_INFO << "Sample NanoLog: " << 1 << 2.5 << 'c';

如何编译

由于使用了C++17的新特性,所以需要支持C++17的编译器,gcc7.2,vs2017 15.5

roadmap

  1. 增加文件数量上限
  2. 重新写日志从上次的位置继续写

nanolog's People

Contributors

qicosmos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nanolog's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.