Page MenuHomeMusing Studio

logging.go
No OneTemporary

logging.go

package main
import (
"fmt"
"gopkg.in/urfave/cli.v1"
"os"
)
// 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") {
fmt.Fprintf(os.Stderr, s+"\n", p...)
}
}
// InfolnQuit logs the message to stderr and exits normally (without an error).
func InfolnQuit(s string, p ...interface{}) {
fmt.Fprintf(os.Stderr, s+"\n", p...)
os.Exit(0)
}
// Error
func Errorln(s string, p ...interface{}) {
fmt.Fprintf(os.Stderr, s+"\n", p...)
}
// ErrorlnQuit logs the message to stderr and exits with an error code.
func ErrorlnQuit(s string, p ...interface{}) {
fmt.Fprintf(os.Stderr, s+"\n", p...)
os.Exit(1)
}

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 6, 5:33 AM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3466264

Event Timeline