Sfoglia il codice sorgente

log.Info will respect global flags

pull/36/head
Rob Loranger 4 anni fa
parent
commit
941d234395
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: D6F1633A4F0903B8
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      log/logging.go

+ 1
- 1
log/logging.go Vedi File

@@ -10,7 +10,7 @@ import (
// Info logs general diagnostic messages, shown only when the -v or --verbose
// flag is provided.
func Info(c *cli.Context, s string, p ...interface{}) {
if c.Bool("v") || c.Bool("verbose") {
if c.Bool("v") || c.Bool("verbose") || c.GlobalBool("v") || c.GlobalBool("verbose") {
fmt.Fprintf(os.Stderr, s+"\n", p...)
}
}


Caricamento…
Annulla
Salva