Coder Social home page Coder Social logo

myutils's Introduction

myUtils

主要模仿 Beego Log  在修改一些自己想要的东东

SetShowLeave 设定输出Log级别

SetOutPutLeave 设定 输出到文件的Log级别

SetOutputFileLog 设定输出名和是否输出到文件

处理部分log的方法
	grep -r "【E】" xxx.log >>  error.log

完善测试用例
	go test -bench=.*

例:

	SetShowLeave(LeaveWarning) 
	//SetShowLeave(LeaveNoShow) // 完全不显示-高并发项目中用到比较多
	SetOutputFileLog("test")
		设定后调用
	Notice("Notice")
	Warn("Warn")
显示的时候只显示 Warn 文件记录的时候 Notice,Warn 全部记录

0.2 版本 把所有日志放到 名字_log 目录里

增加 log  细分存放

1.0 版本 删除 -> 增加 log 细分存放

优化log输出文件缓慢

优化文件显示频繁创建变量

增加文件输出的时候缓存并且间隔输出

增加立即文件输出接口	(建议defer使用)

myutils's People

Contributors

soekchl avatar

Watchers

 avatar  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.