bump 3rd party

This commit is contained in:
Xiang Li
2013-09-21 23:09:20 -04:00
parent 940294d1cd
commit d3fbf6d997
32 changed files with 288 additions and 97 deletions

View File

@ -1,3 +1,2 @@
name = example
name = logger3
sync = 0

View File

@ -22,14 +22,14 @@ import (
)
func main() {
logger1, _ := logging.SimpleLogger("main")
logger1, _ := logging.SimpleLogger("logger1")
logger1.SetLevel(logging.NOTSET)
logger1.Error("this is a test from error")
logger1.Debug("this is a test from debug")
logger1.Notset("orz", time.Now().UnixNano())
logger1.Destroy()
logger2, _ := logging.RichLogger("main")
logger2, _ := logging.RichLogger("logger2")
logger2.SetLevel(logging.DEBUG)
logger2.Error("this is a test from error")
logger2.Debug("this is a test from debug")

View File

@ -16,7 +16,7 @@
package logging
// Logln receives log request from the client. The request includes a set of
// Log receives log request from the client. The request includes a set of
// variables.
func (logger *Logger) Log(level Level, v ...interface{}) {
// Don't delete this calling. The calling is used to keep the same

View File

@ -97,7 +97,7 @@ func RichLogger(name string) (*Logger, error) {
// FileLogger creates a new logger with file output.
func FileLogger(name string, level Level, format string, timeFormat string, file string, sync bool) (*Logger, error) {
out, err := os.Create(file)
out, err := os.OpenFile(file, os.O_WRONLY|os.O_APPEND|os.O_CREATE, os.ModeAppend|0666)
if err != nil {
return nil, err
}