godoc for extra packages
This commit is contained in:
parent
fec3550702
commit
b941df68e1
4 changed files with 17 additions and 2 deletions
|
|
@ -29,16 +29,23 @@ const (
|
|||
|
||||
var logLevel int64
|
||||
|
||||
/* Set the log level from 0 to 4
|
||||
* currently only 0, 1, and 2 are used.
|
||||
*/
|
||||
func SetLogLvl(lvl int64) {
|
||||
if lvl < 4 && lvl > 0 {
|
||||
logLevel = lvl
|
||||
}
|
||||
}
|
||||
|
||||
/* get current log level as int
|
||||
*/
|
||||
func GetLogLvl() int64 {
|
||||
return logLevel
|
||||
}
|
||||
|
||||
/* writes a message to the log
|
||||
*/
|
||||
func Log(lvl int, msg, context string) {
|
||||
if int64(lvl) > logLevel {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue