logger

package
v0.0.0-...-dca1b14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

README

Socket.io Logging

Override internal logger with:

import (
	...
    "github.com/thisismz/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
}

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Error

func Error(msg string, err error)

func Info

func Info(msg string, args ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL