All Projects → auula → sprout

auula / sprout

Licence: MIT license
Golang logging library supporting log retrieval.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to sprout

Xlog
Android logger, pretty, powerful and flexible, log to everywhere, save to file, all you want is here.
Stars: ✭ 2,468 (+2803.53%)
Mutual labels:  log, logger, file
logt
🖥️ A colourful logger for the browser
Stars: ✭ 35 (-58.82%)
Mutual labels:  color, log, logger
Android Filelogger
A general-purpose logging library with built-in support to save logs to file efficiently.
Stars: ✭ 70 (-17.65%)
Mutual labels:  log, logger, file
Go Logger
一个简单而强大的 golang 日志工具包,支持同步和异步输出到 命令行,文件, api 接口,文件支持按文件大小,文件行数,日期切分;A simple and powerful golang logging toolkit that supports synchronous and asynchronous output to the console, file, API interfaces, file support by file size, file line number, date sharding.
Stars: ✭ 152 (+78.82%)
Mutual labels:  log, logger, file
analog-ce
Analog CE
Stars: ✭ 14 (-83.53%)
Mutual labels:  logfile, log
Golog
A high-performant Logging Foundation for Go Applications. X3 faster than the rest leveled loggers.
Stars: ✭ 208 (+144.71%)
Mutual labels:  log, logger
log-target-file
Yii Logging Library - File Target
Stars: ✭ 19 (-77.65%)
Mutual labels:  log, file
node-color-log
⌨️ The more powerful JavaScript logger for NodeJS and browsers ✏️
Stars: ✭ 58 (-31.76%)
Mutual labels:  color, logger
Fliplog
fluent logging with verbose insight, colors, tables, emoji, filtering, spinners, progress bars, timestamps, capturing, stack traces, tracking, presets, & more...
Stars: ✭ 41 (-51.76%)
Mutual labels:  color, log
Xa
Beautiful & Customizable logger ❤️
Stars: ✭ 78 (-8.24%)
Mutual labels:  color, log
ng-logger
Angular logger service
Stars: ✭ 65 (-23.53%)
Mutual labels:  log, logger
Monolog Bundle
Symfony Monolog Bundle
Stars: ✭ 2,532 (+2878.82%)
Mutual labels:  log, logger
log
Aplus Framework Log Library
Stars: ✭ 14 (-83.53%)
Mutual labels:  log, logger
LogDNA-Android-Client
Android client for LogDNA
Stars: ✭ 22 (-74.12%)
Mutual labels:  log, logger
log-utils
Basic logging utils: colors, symbols and timestamp.
Stars: ✭ 24 (-71.76%)
Mutual labels:  color, log
Logcat
Android 日志打印框架,在手机上可以直接看到 Logcat 日志啦
Stars: ✭ 189 (+122.35%)
Mutual labels:  log, logger
Acho
The Hackable Log
Stars: ✭ 189 (+122.35%)
Mutual labels:  log, logger
colocat
Fegeya Colocat, Colorized 'cat' implementation. Written in C++17.
Stars: ✭ 14 (-83.53%)
Mutual labels:  color, file
Lajax
🚀 lajax - 前端日志解决方案。
Stars: ✭ 181 (+112.94%)
Mutual labels:  log, logger
Logger
✔️ Simple, pretty and powerful logger for android
Stars: ✭ 13,093 (+15303.53%)
Mutual labels:  log, logger

⚠️ 本库是本人在入坑go一个星期的时候写出来的,代码质量有点差,谨慎使用!,后面有空将会重构。

LogKer

LogKer It's a log Library of Golang. It's easy to use.👨‍💻‍

📚中文说明 | 🤩Document | 👨‍💻‍ Release


Video link

Features

  • Support file backup.
  • Simple and easy to use.
  • Support file storage log.
  • Support console color printing.
  • Custom log file storage location.
  • Support setting time and time zone.
  • Support log file size for split storage.
  • Error level output to specified file separately.
  • Four levels of debug info error warning are supported.
  • Future support: The remote computer stores the socket output🙏.
  • The project is constantly maintained and updated. I like 😍A kind of Please click star Thanks♪(・ω・)ノ!
  • Is this you?😜

Upgrade List

  • v1.1.5 Support for custom message formats.(SerialVersion) issues1
  • v1.1.8 Support coroutine to record logs,The code base is smaller and lighter(AsynchronousProcessingVersion).

Historical Documents

The Documents version is v1.1.8

Installation

🔝 The minimum requirement of Go version is 1.11. 🔝 Your project also uses go module!!!

go get github.com/higker/logker

OR

go get -u github.com/higker/logker

command add -u flag to update in the future.

Use Example

1. File Logger

package main

import (
	klog "github.com/higker/logker"
	"time"
)

func main() {
	// Specify file location! Create folder in advance!!
	dir := "/Users/ding/Documents/test_log"
	// New file logger
	// File Max size : You can also use built-in constants
	// klog.GB1  	= 1GB
	// klog.MB10  	= 10MB
 	// klog.MB100	= 100MB
	format := "{level} - DATE {time}  - POS {position} - MSG {message}" //This version was modified from v 1.1.5
	//Create Log Buffer
    	task := InitAsync(Qs1w)
   	flog,e := klog.NewFlog(klog.DEBUG, true, klog.Shanghai, dir, "log", 10*1024, 0777,format,task)
    	if e != nil{
       	    .... //Custom Operation
   	}
	// Analog output log
	for {
		flog.Debug("DEBUG : %d + %d = %d",1,2,1+2)
		flog.Error("ERROR")
		flog.Warning("WARNING %p",flog)
		flog.Info("INFO %s","Hello LogKer.")
		time.Sleep(2 * time.Second)
	}
}

👆Parameter note List:

// Build File logger
// Args note
// logLevel:    lev,       \\ logging level
// wheError:    wheErr,    \\ whether enable  error alone file
// directory:   dir,	   \\ logging file save directory
// fileName:    fileName,  \\ logging save file name
// timeZone:    zone,	   \\ load time zone format
// power:       power,     \\ file system power
// fileMaxSize: size,      \\ logging alone file max size
// task := InitAsync(Qs1w) \\ createsABufferForCoroutineLogProcessing
// format :
	// Now upgrade to version v 1.1.5 to customize the message output format ~
	// TheCustomTagNameMustBe {level} {time} {position} {message}
	// The location of the custom label is the location
	// where the program outputs the corresponding log message at run time!!!!
	// forExampleHereIsMyCustom
	// 1. //format := "{level} - {time} - {position} - {message}"

2. Console Logger

package main

import (
	"github.com/higker/logker"
	"strings"
)

//type Formatting string

// logKer library Test
func main() {
	// Now upgrade to version v 1.1.5 to customize the message output format ~
	// TheCustomTagNameMustBe {level} {time} {position} {message}
	// The location of the custom label is the location
	// where the program outputs the corresponding log message at run time!!!!
	// forExampleHereIsMyCustom
	// 1. //format := "{level} - {time} - {position} - {message}"
	format := "{level} - 时间 {time}  - 位置 {position} - 消息 {message}" //This version was modified from v 1.1.5
    	//Create Log Buffer
    	task := InitAsync(Qs1w)
	log,e := logker.NewClog(logker.DEBUG, logker.Shanghai, format,task)
    	if e != nil{
        	..... //Custom Operation
    	}
	log.Debug("DEBUG %s","自定义日志消息匹配符测试")
	log.Info("%v", log)
	log.Warning("%v", logker.Shanghai)
	log.Error("ERROR")
}

OutPut

[ DEBUG ] - 时间 2020-04-20 11:57:23.8927  - 位置 main.go|main.main:23 - 消息 DEBUG 自定义日志消息匹配符测试
[  INFO ] - 时间 2020-04-20 11:57:23.8928  - 位置 main.go|main.main:24 - 消息 &{0 Asia/Shanghai 0xc00008e220 {level} - 时间 {t位置 {position} - 消息 {message}}
[WARNING] - 时间 2020-04-20 11:57:23.8928  - 位置 main.go|main.main:25 - 消息 Asia/Shanghai
[ ERROR ] - 时间 2020-04-20 11:57:23.8929  - 位置 main.go|main.main:26 - 消息 ERROR

3. Effect:

The screenshot is not updated ~ The current screenshot is v1.0.9 version, you can install the library yourself to see the effect. LogKerGolang

log,golang,logKer

Thank list🤝

Other

License

This project open source is MIT License . See the LICENSE file content.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].