apex / apex/log

Level.String panics if Level == InvalidLevel

Abierto
#75 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
1.4k
Forks
110
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

hi,

the method `LeveL.String` panics when `Level==InvalidLevel`.

https://github.com/apex/log/blob/master/levels.go#L44
https://github.com/apex/log/blob/master/levels.go#L17

I suggest to add a statement before the slice access so that this pseudo value does not appear in the `levelNames` / `levelStrings` variables.

It could return an empty string or something like `invalid`

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.