forked from buffrr/letsdane
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed logging; solvec bug with extenstion length check
- Loading branch information
1 parent
25817fe
commit a3b9b2d
Showing
6 changed files
with
111 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package debuglog | ||
|
||
import ( | ||
"log" | ||
"os" | ||
) | ||
|
||
type DebugLogger struct { | ||
Verbose bool | ||
*log.Logger | ||
} | ||
|
||
var Logger *DebugLogger | ||
|
||
func (l *DebugLogger) Set() { | ||
l.Verbose = true | ||
} | ||
|
||
func NewDebugLogger(verbose bool) *DebugLogger { | ||
return &DebugLogger{ | ||
Verbose: verbose, | ||
Logger: log.New(os.Stdout, "", log.LstdFlags), | ||
} | ||
} | ||
|
||
func (l *DebugLogger) Debug(v ...interface{}) { | ||
if l.Verbose { | ||
l.Println(v...) | ||
} | ||
} | ||
|
||
func (l *DebugLogger) Debugf(s string, v ...interface{}) { | ||
if l.Verbose { | ||
l.Printf(s, v...) | ||
} | ||
} | ||
|
||
// func (l *DebugLogger) Print(v ...interface{}) { | ||
// log.Print(v...) | ||
// } | ||
// | ||
// func (l *DebugLogger) Fatal(v ...interface{}) { | ||
// log.Fatal(v...) | ||
// } | ||
// | ||
// func (l *DebugLogger) Fatalf(a string, v ...interface{}) { | ||
// log.Fatalf(a, v...) | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,7 @@ import ( | |
) | ||
|
||
var ( | ||
// Version the current version | ||
Version = "0.0.2" | ||
Version = "0.0.4" | ||
) | ||
|
||
const ( | ||
|