Customizing output format
@Qix- já está trabalhando nisso.
Desde 20/6/2018.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
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.
- Linguagem predominante
- JavaScript
- Estrelas
- 11.5k
- Forks
- 993
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de debug-js/debug
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
-
Debug as JSONAberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 28/100
Todas as issues de debug-js/debug
Issues semelhantes
-
bug CI breakage triage needed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
oppia/oppia#27517 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
draftomen enhancement size: S
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
andreagrandi/draftomen#761 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
HarperFast/harper#2866 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
HarperFast/harper-pro#927 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
anthropics/skills#1897 · 1 comentário ·
Mantenedores costumam responder em até 1 dia