customize log format
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
Start by locating the rest-server command's existing --log output path and how its current access-log format is produced. Add the requested --logformat option with timestamp-style formatting, while preserving the existing request fields; done means logs can use the sortable example format and the current logging behavior remains available.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Output of rest-server --version
rest-server version rest-server 0.12.1 compiled with go1.20.5 on linux/386
What should rest-server do differently?
Add an option --logformat
What are you trying to do? What is your use case?
The log file has entries of this format:
129.69.202.138 - - [10/May/2024:09:38:26 +0200] "HEAD /test/config HTTP/2.0" 200 0 "" "Go-http-client/2.0"
But I prefer:
[2024-05-10 09:38:26] 129.69.202.138 - - "HEAD /test/config HTTP/2.0" 200 0 "" "Go-http-client/2.0"
Because it is easy sortable.
So, a new option like this would be great:
--logformat "[%Y-%m-%d %H:%M:%S] ..."
My workaround so far is:
rest-server $OTHER_OPTIONS --log - | perl_log_converter >> $DATA/log
Did rest-server help you today? Did it make you happy in any way?
- Lingua principale
- Go
- Stelle
- 1.5k
- Fork
- 179
- Merge medio
- 15g 9h
- PR unite (30g)
- 2
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di restic/rest-server
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
restic/rest-server#389 ·
-
state: need feedback
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
restic/rest-server#391 · 5 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
restic/rest-server#390 · 1 commento · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
restic/rest-server#384 · 2 commenti ·
-
Exit after configurable idle period for servers with limited RAM or are off/suspended when unusedAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 50/100
restic/rest-server#383 · 2 commenti ·
Tutte le issue di restic/rest-server
Issue simili
-
cvss-severity:high devguard l3montree-cybersecurity/devguard/devguard pkg:golang/github.com/l3montree-dev/devguard risk:low state:open
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
l3montree-dev/devguard#3146 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
CLI
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
databricks/cli#6910 ·
I maintainer di solito rispondono entro 1 giorno
-
Table presenter appends a spurious ", ..." to the FIX column when all fix versions are already shownAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
canonical/microceph#900 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
vulncheck or vulndb
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno