Categorygithub.com/snail007/webtail
modulepackage
0.0.0-20180703101102-49550efa42b0
Repository: https://github.com/snail007/webtail.git
Documentation: pkg.go.dev

# README

webtail

golang implement of "tail -f" unix like, which in web browser , show log file content in browser real time.

Usage

package main

import (
    "log"
    "github.com/snail007/webtail"
)

func main() {
    address := ":8822"
    basedir = "./logs"
    listener, err := webtail.Serve(address, basedir)
    if err != nil {
        log.Fatal(err)
    }
    log.Printf("tail server on %s",(*listener).Addr())
    select {}
}

then access :

http://127.0.0.1:8822/show/logfilename#width=100%&height=300px

logfilename is the log file name (no extension) in ./logs ,

all log files in ./logs must has extension of .log

width=100%&height=300px is the div width and height which show log text .

the web page will show log content in real time.

Binary

you can also use prebuild binary , you can get it here

Usage of ./webtail:
  -d string
        dir path of log files
  -l string
        listen address (default ":8100")
  -v     show version

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author