Skip to content

Commit

Permalink
Updates comments in example and main file
Browse files Browse the repository at this point in the history
  • Loading branch information
apsdehal committed Sep 28, 2014
1 parent f1649fa commit e3fbe5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions examples/example.go
Expand Up @@ -13,9 +13,14 @@ func main () {

// Critically log critical
log.Critical("This is Critical!")
// Debug
log.Debug("This is Debug!")
// Give the Warning
log.Warning("This is Warning!")
// Show the error
log.Error("This is Error!")
// Notice
log.Notice("This is Notice!")
// Show the info
log.Info("This is Info!")
}
5 changes: 3 additions & 2 deletions logger.go
Expand Up @@ -12,6 +12,7 @@ import (
)

var (
// Map for te various codes of colors
colors map[string]string

// Contains color strings for stdout
Expand Down Expand Up @@ -108,7 +109,7 @@ func New(module string, color int) (*Logger, error) {
// The log commnand is the function available to user to log message, lvl specifies
// the degree of the messagethe user wants to log, message is the info user wants to log
func (l *Logger) Log(lvl string, message string) {
var formatString string = "#%d %s â–¶ %.4s %s"
var formatString string = "#%d %s â–¶ %.3s %s"
info := &Info{
Id: atomic.AddUint64(&sequenceNo, 1),
Time: time.Now().Format("2006-01-02 15:04:05") ,
Expand Down Expand Up @@ -157,7 +158,7 @@ func (l *Logger) Info(message string) {
l.Log("INFO", message)
}

// Devug logs a message at Devug level
// Debug logs a message at Debug level
func (l *Logger) Debug(message string) {
l.Log("DEBUG", message)
}

0 comments on commit e3fbe5f

Please sign in to comment.