Customizing output format
@Qix- ya está trabajando en esto.
Desde el 20/6/2018.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Ref #573, #565, #553, #456, #453, #402, #578, #526, #525, #488
Right now it's very clear that debug takes a subjective stance on its output format. This is unsuitable for a variety of use-cases, especially the disparity between the isatty(2) == 0 and == 1 cases.
Let's figure out how to solve this.
My initial knee-jerk idea would be to introduce a DEBUG_FORMAT environment variable. It would accept a string with delimiters similar to date-time or printf formats that indicate different elements of a debug log.
This would also remove the need for a plethora of custom environment variables that have been proposed.
We'd have a default format that would then be the same between interactive/non-interactive TTY sessions (fd 2, as always).
This would look something like
DEBUG_FORMAT="%N %m %D"
Where %N is the namespace (colored if interactive terminal), %m is the message and %D is the time diff - the exact format in the screenshot in the readme.
Of course there would be other delimiters available, and the above doesn't necessarily need to be the default, but it would solve pretty much any use-case imaginable regarding the output format in a non-subjective manner.
That's just my personal proposal, but this RFC is after any solution, so if you have a different idea please sound off below.
- Lenguaje dominante
- JavaScript
- Estrellas
- 11.5k
- Forks
- 992
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de debug-js/debug
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
-
Debug as JSON Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
console.group and groupCollapsed Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 28/100
Todos los issues de debug-js/debug
Issues similares
-
Update HugeIcons library Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
antfu-collective/icones#398 ·
-
ECmail.com Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
wesbos/burner-email-providers#554 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
components-web-app/docs#92 ·