1
0
mirror of https://github.com/taigrr/log-socket synced 2025-01-18 04:53:14 -08:00

4 Commits

Author SHA1 Message Date
147a8cb30b Merge pull request #10 from ethanholz/README
Added a README
2022-10-10 13:38:59 -07:00
Ethan Holz
8e044e3993 docs: Updated README to include running example. 2022-10-10 12:16:52 -05:00
Ethan Holz
e97d37012e docs: Added inital README 2022-10-10 12:09:29 -05:00
ebef59a9a8 actually set value for depth 2021-08-23 21:58:05 -07:00
2 changed files with 16 additions and 1 deletions

15
README.md Normal file
View File

@@ -0,0 +1,15 @@
log-socket
==========
`log-socket` is a drop-in replacement for Go's `log` package that allows for streaming of logs via WebSockets.
## Installation
To install the library:
`go get github.com/taigrr/log-socket`
## Running
To run a demo of this library:
`go run main.go`
This demo will do a sample of every log type and push results to `0.0.0.0:8080`. Once running, you can open a browser and navigate to
`0.0.0.0:8080` to see an example implementation of how logs are streamed.

View File

@@ -7,7 +7,7 @@ import (
"time"
)
func (l Logger) SetInfoDepth(depth int) {
func (l *Logger) SetInfoDepth(depth int) {
l.FileInfoDepth = depth
}