mirror of
https://github.com/taigrr/log-socket
synced 2025-01-18 04:53:14 -08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
f0c16a0c56
|
|||
|
c18854598d
|
|||
|
63ed3a2ad7
|
|||
|
f51ec53a89
|
|||
|
d21c91379e
|
|||
|
af2116af48
|
|||
|
b65a10e7a8
|
|||
|
a07d3a11df
|
|||
|
5f18def7fa
|
12
.github/FUNDING.yml
vendored
Normal file
12
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: taigrr # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||||
|
patreon: # Replace with a single Patreon username
|
||||||
|
open_collective: # Replace with a single Open Collective username
|
||||||
|
ko_fi: # Replace with a single Ko-fi username
|
||||||
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
|
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
|
liberapay: # Replace with a single Liberapay username
|
||||||
|
issuehunt: # Replace with a single IssueHunt username
|
||||||
|
otechie: # Replace with a single Otechie username
|
||||||
|
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||||
12
LICENSE
Normal file
12
LICENSE
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Copyright (C) 2019-2021 by Tai Groot <tai@taigrr.com>
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
purpose with or without fee is hereby granted.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
@@ -7,7 +7,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func LogSocketViewHandler(w http.ResponseWriter, r *http.Request) {
|
func LogSocketViewHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
wsResource := "ws://" + r.Host + r.URL.Path
|
wsResource := r.Host + r.URL.Path
|
||||||
|
if r.TLS != nil {
|
||||||
|
wsResource = "wss://" + wsResource
|
||||||
|
} else {
|
||||||
|
wsResource = "ws://" + wsResource
|
||||||
|
}
|
||||||
wsResource = strings.TrimSuffix(wsResource, "/") + "/ws"
|
wsResource = strings.TrimSuffix(wsResource, "/") + "/ws"
|
||||||
homeTemplate.Execute(w, wsResource)
|
homeTemplate.Execute(w, wsResource)
|
||||||
}
|
}
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -1,5 +1,5 @@
|
|||||||
module github.com/taigrr/log-socket
|
module github.com/taigrr/log-socket
|
||||||
|
|
||||||
go 1.16
|
go 1.17
|
||||||
|
|
||||||
require github.com/gorilla/websocket v1.4.2
|
require github.com/gorilla/websocket v1.4.2
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package logger
|
package log
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
@@ -10,16 +10,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
LTrace Level = iota
|
|
||||||
LDebug
|
|
||||||
LInfo
|
|
||||||
LWarn
|
|
||||||
LError
|
|
||||||
LPanic
|
|
||||||
LFatal
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
clients []*Client
|
clients []*Client
|
||||||
sliceTex sync.Mutex
|
sliceTex sync.Mutex
|
||||||
@@ -142,9 +132,19 @@ func Trace(args ...interface{}) {
|
|||||||
level: LTrace,
|
level: LTrace,
|
||||||
}
|
}
|
||||||
createLog(e)
|
createLog(e)
|
||||||
// entry := logger.WithFields(logrus.Fields{})
|
}
|
||||||
// entry.Data["file"] = fileInfo(2)
|
|
||||||
// entry.Debug(args...)
|
// Formatted print for Trace
|
||||||
|
func Tracef(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "TRACE",
|
||||||
|
level: LTrace,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debug prints out logs on debug level
|
// Debug prints out logs on debug level
|
||||||
@@ -158,7 +158,19 @@ func Debug(args ...interface{}) {
|
|||||||
level: LDebug,
|
level: LDebug,
|
||||||
}
|
}
|
||||||
createLog(e)
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Formatted print for Debug
|
||||||
|
func Debugf(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "DEBUG",
|
||||||
|
level: LDebug,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Info prints out logs on info level
|
// Info prints out logs on info level
|
||||||
@@ -174,6 +186,45 @@ func Info(args ...interface{}) {
|
|||||||
createLog(e)
|
createLog(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Formatted print for Info
|
||||||
|
func Infof(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "INFO",
|
||||||
|
level: LInfo,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Info prints out logs on info level
|
||||||
|
func Notice(args ...interface{}) {
|
||||||
|
output := fmt.Sprint(args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "NOTICE",
|
||||||
|
level: LNotice,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Formatted print for Info
|
||||||
|
func Noticef(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "NOTICE",
|
||||||
|
level: LNotice,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
// Warn prints out logs on warn level
|
// Warn prints out logs on warn level
|
||||||
func Warn(args ...interface{}) {
|
func Warn(args ...interface{}) {
|
||||||
output := fmt.Sprint(args...)
|
output := fmt.Sprint(args...)
|
||||||
@@ -187,6 +238,19 @@ func Warn(args ...interface{}) {
|
|||||||
createLog(e)
|
createLog(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Formatted print for Warn
|
||||||
|
func Warnf(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "WARN",
|
||||||
|
level: LWarn,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
// Error prints out logs on error level
|
// Error prints out logs on error level
|
||||||
func Error(args ...interface{}) {
|
func Error(args ...interface{}) {
|
||||||
output := fmt.Sprint(args...)
|
output := fmt.Sprint(args...)
|
||||||
@@ -200,6 +264,19 @@ func Error(args ...interface{}) {
|
|||||||
createLog(e)
|
createLog(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Formatted print for error
|
||||||
|
func Errorf(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "ERROR",
|
||||||
|
level: LError,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
// Panic prints out logs on panic level
|
// Panic prints out logs on panic level
|
||||||
func Panic(args ...interface{}) {
|
func Panic(args ...interface{}) {
|
||||||
output := fmt.Sprint(args...)
|
output := fmt.Sprint(args...)
|
||||||
@@ -223,6 +300,29 @@ func Panic(args ...interface{}) {
|
|||||||
panic(errors.New(output))
|
panic(errors.New(output))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Formatted print for panic
|
||||||
|
func Panicf(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "PANIC",
|
||||||
|
level: LPanic,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
if len(args) >= 0 {
|
||||||
|
switch args[0].(type) {
|
||||||
|
case error:
|
||||||
|
panic(args[0])
|
||||||
|
default:
|
||||||
|
// falls through to default below
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Flush()
|
||||||
|
panic(errors.New(output))
|
||||||
|
}
|
||||||
|
|
||||||
// Fatal prints out logs on fatal level
|
// Fatal prints out logs on fatal level
|
||||||
func Fatal(args ...interface{}) {
|
func Fatal(args ...interface{}) {
|
||||||
output := fmt.Sprint(args...)
|
output := fmt.Sprint(args...)
|
||||||
@@ -238,6 +338,21 @@ func Fatal(args ...interface{}) {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Formatted print for fatal
|
||||||
|
func Fatalf(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "FATAL",
|
||||||
|
level: LFatal,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
Flush()
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
// fileInfo for getting which line in which file
|
// fileInfo for getting which line in which file
|
||||||
func fileInfo(skip int) string {
|
func fileInfo(skip int) string {
|
||||||
_, file, line, ok := runtime.Caller(skip)
|
_, file, line, ok := runtime.Caller(skip)
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package logger
|
package log
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
240
log/logger.go
Normal file
240
log/logger.go
Normal file
@@ -0,0 +1,240 @@
|
|||||||
|
package log
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Trace prints out logs on trace level
|
||||||
|
func (_ Logger) Trace(args ...interface{}) {
|
||||||
|
output := fmt.Sprint(args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "TRACE",
|
||||||
|
level: LTrace,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Formatted print for Trace
|
||||||
|
func (_ Logger) Tracef(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "TRACE",
|
||||||
|
level: LTrace,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Debug prints out logs on debug level
|
||||||
|
func (_ Logger) Debug(args ...interface{}) {
|
||||||
|
output := fmt.Sprint(args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "DEBUG",
|
||||||
|
level: LDebug,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Formatted print for Debug
|
||||||
|
func (_ Logger) Debugf(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "DEBUG",
|
||||||
|
level: LDebug,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Info prints out logs on info level
|
||||||
|
func (_ Logger) Info(args ...interface{}) {
|
||||||
|
output := fmt.Sprint(args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "INFO",
|
||||||
|
level: LInfo,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Formatted print for Info
|
||||||
|
func (_ Logger) Infof(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "INFO",
|
||||||
|
level: LInfo,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Info prints out logs on info level
|
||||||
|
func (_ Logger) Notice(args ...interface{}) {
|
||||||
|
output := fmt.Sprint(args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "NOTICE",
|
||||||
|
level: LNotice,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Formatted print for Info
|
||||||
|
func (_ Logger) Noticef(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "NOTICE",
|
||||||
|
level: LNotice,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Warn prints out logs on warn level
|
||||||
|
func (_ Logger) Warn(args ...interface{}) {
|
||||||
|
output := fmt.Sprint(args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "WARN",
|
||||||
|
level: LWarn,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Formatted print for Warn
|
||||||
|
func (_ Logger) Warnf(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "WARN",
|
||||||
|
level: LWarn,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Error prints out logs on error level
|
||||||
|
func (_ Logger) Error(args ...interface{}) {
|
||||||
|
output := fmt.Sprint(args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "ERROR",
|
||||||
|
level: LError,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Formatted print for error
|
||||||
|
func (_ Logger) Errorf(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "ERROR",
|
||||||
|
level: LError,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Panic prints out logs on panic level
|
||||||
|
func (_ Logger) Panic(args ...interface{}) {
|
||||||
|
output := fmt.Sprint(args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "PANIC",
|
||||||
|
level: LPanic,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
if len(args) >= 0 {
|
||||||
|
switch args[0].(type) {
|
||||||
|
case error:
|
||||||
|
panic(args[0])
|
||||||
|
default:
|
||||||
|
// falls through to default below
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Flush()
|
||||||
|
panic(errors.New(output))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Formatted print for panic
|
||||||
|
func (_ Logger) Panicf(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "PANIC",
|
||||||
|
level: LPanic,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
if len(args) >= 0 {
|
||||||
|
switch args[0].(type) {
|
||||||
|
case error:
|
||||||
|
panic(args[0])
|
||||||
|
default:
|
||||||
|
// falls through to default below
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Flush()
|
||||||
|
panic(errors.New(output))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fatal prints out logs on fatal level
|
||||||
|
func (_ Logger) Fatal(args ...interface{}) {
|
||||||
|
output := fmt.Sprint(args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "FATAL",
|
||||||
|
level: LFatal,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
Flush()
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Formatted print for fatal
|
||||||
|
func (_ Logger) Fatalf(format string, args ...interface{}) {
|
||||||
|
output := fmt.Sprintf(format, args...)
|
||||||
|
e := Entry{
|
||||||
|
Timestamp: time.Now(),
|
||||||
|
Output: output,
|
||||||
|
File: fileInfo(2),
|
||||||
|
Level: "FATAL",
|
||||||
|
level: LFatal,
|
||||||
|
}
|
||||||
|
createLog(e)
|
||||||
|
Flush()
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
@@ -1,10 +1,21 @@
|
|||||||
package logger
|
package log
|
||||||
|
|
||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
type LogWriter chan Entry
|
type LogWriter chan Entry
|
||||||
type Level int
|
type Level int
|
||||||
|
|
||||||
|
const (
|
||||||
|
LTrace Level = iota
|
||||||
|
LDebug
|
||||||
|
LInfo
|
||||||
|
LNotice
|
||||||
|
LWarn
|
||||||
|
LError
|
||||||
|
LPanic
|
||||||
|
LFatal
|
||||||
|
)
|
||||||
|
|
||||||
type Client struct {
|
type Client struct {
|
||||||
LogLevel Level `json:"level"`
|
LogLevel Level `json:"level"`
|
||||||
writer LogWriter
|
writer LogWriter
|
||||||
@@ -18,3 +29,6 @@ type Entry struct {
|
|||||||
Level string `json:"level"`
|
Level string `json:"level"`
|
||||||
level Level
|
level Level
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Logger struct {
|
||||||
|
}
|
||||||
2
main.go
2
main.go
@@ -6,7 +6,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/taigrr/log-socket/browser"
|
"github.com/taigrr/log-socket/browser"
|
||||||
"github.com/taigrr/log-socket/logger"
|
logger "github.com/taigrr/log-socket/log"
|
||||||
"github.com/taigrr/log-socket/ws"
|
"github.com/taigrr/log-socket/ws"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"github.com/taigrr/log-socket/logger"
|
logger "github.com/taigrr/log-socket/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// var addr = flag.String("addr", "localhost:8080", "http service address")
|
// var addr = flag.String("addr", "localhost:8080", "http service address")
|
||||||
|
|||||||
Reference in New Issue
Block a user