Skip to content

tomatosource/socklog

Repository files navigation

socklog

A basic websocket logging util library to help debug terminal UI applications, or any app thats tricky to write to log to stdout, where for whatever reason you don't want to log to file.

Built upon Gorilla's Websocket package.

Installation

go get github.com/tomatosource/socklog

Usage

Start the server

$ socklog
Listening for logs...

Initialise your logger

socklogger := socklog.MustNew("localhost:8080")
defer socklogger.Close()
log.SetOutput(socklogger)

Log as normal

log.Print("hello world")

Options

$ socklog --help
Usage of socklog:
  -addr string
    	http service address (default "localhost:8080")

Other Features

None planned, but this whole repository is less than 100 lines of Go (not counting examples), so it should be fairly easy to poke around in and extend.

About

Go websocket logger & server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages