https://github.com/devfeel/dotlog
Simple and easy go log framework
https://github.com/devfeel/dotlog
app framework go golang log logging
Last synced: 10 months ago
JSON representation
Simple and easy go log framework
- Host: GitHub
- URL: https://github.com/devfeel/dotlog
- Owner: devfeel
- Created: 2017-08-23T11:59:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-01-05T13:12:45.000Z (about 6 years ago)
- Last Synced: 2025-04-14T17:05:16.290Z (10 months ago)
- Topics: app, framework, go, golang, log, logging
- Language: Go
- Homepage:
- Size: 43 KB
- Stars: 28
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DotLog
Simple and easy go log micro framework
## 1. Install
```
go get -u github.com/devfeel/dotlog
```
## 2. Getting Started
```go
func main() {
//请确保log.conf与你的执行文件同目录
dotlog.StartLogService("log.conf")
log1 := dotlog.GetLogger("FileLogger")
log1.Info("example-normal test main")
log1.InfoS("example-normal", true, time.Now(), "other info")
log1.InfoF("example %v", time.Now)
for {
time.Sleep(time.Hour)
}
}
```
log.conf
```
```
## 3. Features
* 简单易用,100%配置化
* 支持File、UDP、Http、EMail、StdOut五种日志目标
* 支持配置模板:ConfigMode_Classics、ConfigMode_File、ConfigMode_Fmt、ConfigMode_FileFmt
* 支持自定义变量
* 文件支持单文件最大尺寸设置
* 更多待完善