-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mobus
committed
Mar 9, 2022
1 parent
6e710c7
commit 7d31147
Showing
1 changed file
with
22 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,30 @@ | ||
package main | ||
|
||
import "github.com/sunvim/utils/log" | ||
import ( | ||
"fmt" | ||
|
||
"github.com/sunvim/utils/log" | ||
) | ||
|
||
func main() { | ||
log.SetPrefix("Hello") | ||
log.SetPrefix("Example") | ||
|
||
fmt.Println("debug level") | ||
log.SetLevel(log.LevelDebug) | ||
log.Debug("hello debug") | ||
log.Info("hello info") | ||
log.Error("hello error") | ||
|
||
log.Info("info hello log") | ||
fmt.Println("info level") | ||
log.SetLevel(log.LevelInfo) | ||
log.Debug("hello debug") | ||
log.Info("hello info") | ||
log.Error("hello error") | ||
|
||
log.Error("error log") | ||
fmt.Println("error level") | ||
log.SetLevel(log.LevelError) | ||
log.Debug("hello debug") | ||
log.Info("hello info") | ||
log.Error("hello error") | ||
|
||
} |