log

package
v0.0.0-...-cf9ec80 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Paquete applog: logger unificado con formato coloreado para toda la app.

Formato de salida:

[HH:MM:SS] [LEVEL] [scope] mensaje  {campos}

Uso:

log := applog.New("health")
log.Info("petición recibida", zap.String("ip", "127.0.0.1"))

Esto es un thin wrapper sobre go.uber.org/zap que configura el encoder con colores ANSI y el formato deseado. El tipo devuelto es *zap.Logger, por lo que es completamente compatible con el resto del proyecto.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Log

func Log(scope string, level ...string) *zap.Logger

New crea un *zap.Logger coloreado. Si no se pasa level, usa LOG_LEVEL del entorno (fallback: info). level soportado: "debug", "info", "warn", "error".

Types

This section is empty.

Jump to

Keyboard shortcuts

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