Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in latest version (71c896b) #5

Closed
clocklear opened this issue Mar 3, 2016 · 2 comments
Closed

Regression in latest version (71c896b) #5

clocklear opened this issue Mar 3, 2016 · 2 comments

Comments

@clocklear
Copy link

Running the example code:

package main

import (
    "github.com/azer/logger"
    "time"
)

var log = logger.New("app")

func main() {
    log.Info("Starting at %d", 9088)

    log.Info("Requesting an image at foo/bar.jpg")
    timer := log.Timer()
    time.Sleep(time.Millisecond * 250)
    timer.End("Fetched foo/bar.jpg")

    log.Error("Failed to start, shutting down...")
}

with version 71c896b yields the following error:

panic: assignment to entry in nil map

goroutine 1 [running]:
panic(0xc58e0, 0xc820064050)
    /usr/local/go/src/runtime/panic.go:464 +0x3e6
/vendor/github.com/azer/logger.New(0x10baf8, 0x3, 0xc820050000)
    /vendor/github.com/azer/logger/logger.go:26 +0xaa
main.init()
    /example.go:8 +0x65
exit status 2

Reverting to d8432cee resolves the issue:

11:39:22.887 app: Starting at 9088
11:39:22.887 app: Requesting an image at foo/bar.jpg
11:39:23.142 app(254.627113ms): Fetched foo/bar.jpg
11:39:23.142 app(!): Failed to start, shutting down...
@azer
Copy link
Owner

azer commented Mar 3, 2016

@cathalgarvey any ideas ?

@azer
Copy link
Owner

azer commented Mar 3, 2016

@clocklear fixed by 6eca91c

@azer azer closed this as completed Mar 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants