seelog

package module
v0.0.0-...-1cb1457 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2019 License: MIT Imports: 13 Imported by: 0

README

seelog blog Open Source Love License

有了seelog,妈妈再也不用担心我登录服务器查看日志le...
项目地址:https://github.com/xmge/seelog
演示地址:http://seelog.xmge.top/password 欢迎各位gopher使用指正😃

项目背景

A:我去😕,,程序又出问题了,你去看看日志到底是哪里错啦
B:好好好,我马上登陆服务器看看
B:对啦,服务器密码是啥来着....
A:😰 密码是 &#¥&@~
B:额,日志文件在哪呢
A:...................
C:要不项目集成seelog吧,集成特别简单,集成后直接打开浏览器就能看日志了

项目介绍
  • 与golang项目集成、提供浏览器实时查看日志的功能,类似 tail -f xxx.log
  • 支持监控多个日志文件
  • 支持多浏览器同时访问
  • 支持密码认证
  • 支持浏览器 websocket 断线重连
  • 支持暂停、清屏、截图、过滤功能
  • 查找功能可直接使用浏览器 Ctrl+F 来完成
集成方式
  • 在项目中引入seelog, go get github.com/xmge/seelog
  • 在代码中引用
	seelog.See("错误日志","err.log")   // 检测 err.log
	seelog.See("调试日志","debug.log") // 检测 debug.log
	seelog.Serve(9000,"password")
  • 在浏览器中访问 http://host:port/{password}
项目展示

image

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockUntilExists

func BlockUntilExists(fileName string, ctx context.Context) (os.FileInfo, error)

func Config

func Config(user, pass, tlscrt, tlskey, pagedir, logdir string) (err error)

Config 设置配置参数

func SeeAdd

func SeeAdd(name, path string) (err error)

SeeAdd 添加需要监视的文件

func Serve

func Serve(port int) (err error)

Serve 启动服务

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL