Skip to content

Latest commit

 

History

History
 
 

logger

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Socket.io Logging

Override internal logger with:

import (
	...
    "github.com/googollee/go-socket.io/logger"
)

func main() {
    json_logger := slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
        Level: slog.LevelInfo, // Set Level for each handler
    })

	log := slog.New(json_logger).With("server", "socket.io") // attach attribute to all log lines
	logger.Log = log
}