Clean up extra log modules

This commit is contained in:
Noah 2019-04-09 17:47:03 -07:00
parent 2b42a072a0
commit bd3dd41cea
7 changed files with 10 additions and 58 deletions

View File

@ -1,9 +0,0 @@
package events
import "github.com/kirsle/golog"
var log *golog.Logger
func init() {
log = golog.GetLogger("doodle")
}

View File

@ -1,14 +0,0 @@
package render
import "github.com/kirsle/golog"
var log *golog.Logger
func init() {
log = golog.GetLogger("doodle")
log.Configure(&golog.Config{
Level: golog.DebugLevel,
Theme: golog.DarkTheme,
Colors: golog.ExtendedColor,
})
}

View File

@ -4,9 +4,18 @@ import (
"errors" "errors"
"git.kirsle.net/apps/doodle/lib/events" "git.kirsle.net/apps/doodle/lib/events"
"git.kirsle.net/apps/doodle/pkg/log"
"github.com/veandco/go-sdl2/sdl" "github.com/veandco/go-sdl2/sdl"
) )
// Debug certain SDL events
var (
DebugWindowEvents = false
DebugMouseEvents = false
DebugClickEvents = false
DebugKeyEvents = false
)
// Poll for events. // Poll for events.
func (r *Renderer) Poll() (*events.State, error) { func (r *Renderer) Poll() (*events.State, error) {
s := r.events s := r.events

View File

@ -1,7 +1,5 @@
package sdl package sdl
import "git.kirsle.net/apps/doodle/pkg/level"
// Frames to cache for FPS calculation. // Frames to cache for FPS calculation.
const ( const (
maxSamples = 100 maxSamples = 100
@ -16,5 +14,3 @@ var (
fpsSkipped uint32 fpsSkipped uint32
fpsInterval uint32 = 1000 fpsInterval uint32 = 1000
) )
var pixelHistory []level.Pixel

View File

@ -1,17 +0,0 @@
package sdl
import "github.com/kirsle/golog"
var log *golog.Logger
// Verbose debug logging.
var (
DebugMouseEvents = false
DebugClickEvents = false
DebugKeyEvents = false
DebugWindowEvents = false
)
func init() {
log = golog.GetLogger("doodle")
}

View File

@ -6,6 +6,7 @@ import (
"git.kirsle.net/apps/doodle/lib/events" "git.kirsle.net/apps/doodle/lib/events"
"git.kirsle.net/apps/doodle/lib/render" "git.kirsle.net/apps/doodle/lib/render"
"git.kirsle.net/apps/doodle/pkg/log"
"github.com/veandco/go-sdl2/sdl" "github.com/veandco/go-sdl2/sdl"
"github.com/veandco/go-sdl2/ttf" "github.com/veandco/go-sdl2/ttf"
) )

View File

@ -1,14 +0,0 @@
package ui
import "github.com/kirsle/golog"
var log *golog.Logger
func init() {
log = golog.GetLogger("ui")
log.Configure(&golog.Config{
Level: golog.DebugLevel,
Theme: golog.DarkTheme,
Colors: golog.ExtendedColor,
})
}