GithubHelp home page GithubHelp logo

loging's Introduction

loging日志库

日志输出内容

日期:年月日时分秒,可自定义日期格式。
内容:msg的值和自定义kv。
级别:debug、info、warn、error、fatal。
文件名、行号、函数名:可选。

日志输出格式

json格式:{"level":"debug","msg":"read username","time":"2024-03-19T16:06:06+08:00","username":"lgyong"}。
text格式:time="2024-03-19T16:06:44+08:00" level=debug msg="read username" username=lgyong。

日志等级控制

可以设置日志输出等级,ALL输出所有日志,TRACE输出TRACE-FATAL之间的日志,DEBUG输出DEBUG-FATAL之间的日志。
FATAL:严重错误级别,表示系统无法继续运行。
ERROR:错误级别,用于记录错误信息。
WARN:警告级别,表示潜在的问题,但不影响程序的运行。
INFO:信息级别,用于记录程序的正常运行信息。
DEBUG:调试级别,用于详细记录调试信息。
TRACE:追踪级别,提供比DEBUG更详细的信息。
ALL:最低级别,用于启用所有日志记录。

日志输出目标

满足io.writer接口的一个或多个目标。

loging's People

Contributors

lgyong511 avatar

Watchers

 avatar

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.