Added --verbose flag and logging for backend
This commit is contained in:
parent
f5acffa2c5
commit
64f0703c67
|
@ -27,6 +27,10 @@ func RunBackend(conn *RedisConnection) {
|
|||
func HandleRequest(line string, conn *RedisConnection) {
|
||||
defer fmt.Printf("END\n")
|
||||
|
||||
if Verbose {
|
||||
fmt.Printf("LOG\t'%s'\n", line)
|
||||
}
|
||||
|
||||
parts := strings.Split(line, "\t")
|
||||
if len(parts) != 6 {
|
||||
return
|
||||
|
|
|
@ -209,7 +209,6 @@ func templates_index_html() ([]byte, error) {
|
|||
)
|
||||
}
|
||||
|
||||
|
||||
// Asset loads and returns the asset for the given name.
|
||||
// It returns an error if the asset could not be found or
|
||||
// could not be loaded.
|
||||
|
@ -221,7 +220,6 @@ func Asset(name string) ([]byte, error) {
|
|||
}
|
||||
|
||||
// _bindata is a table, holding each asset generator, mapped to its name.
|
||||
var _bindata = map[string] func() ([]byte, error) {
|
||||
var _bindata = map[string]func() ([]byte, error){
|
||||
"templates/index.html": templates_index_html,
|
||||
|
||||
}
|
||||
|
|
4
ddns.go
4
ddns.go
|
@ -16,6 +16,7 @@ var (
|
|||
DdnsDomain string
|
||||
DdnsWebListenSocket string
|
||||
DdnsRedisHost string
|
||||
Verbose bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -27,6 +28,9 @@ func init() {
|
|||
|
||||
flag.StringVar(&DdnsRedisHost, "redis", ":6379",
|
||||
"The Redis socket that should be used")
|
||||
|
||||
flag.BoolVar(&Verbose, "verbose", false,
|
||||
"Be more verbose")
|
||||
}
|
||||
|
||||
func ValidateCommandArgs() {
|
||||
|
|
Loading…
Reference in New Issue