logger: Llongfile -> Lshortfile
This commit is contained in:
parent
ab91e02f03
commit
07a3313362
2
board.go
2
board.go
|
@ -49,7 +49,7 @@ func ChangeBoardSize(width int, height int) {
|
|||
board.currentMino = NewMino()
|
||||
}
|
||||
|
||||
// Clear clears the board to orginal state
|
||||
// Clear clears the board to original state
|
||||
func (board *Board) Clear() {
|
||||
board.width = len(boards[board.boardsIndex].colors)
|
||||
board.height = len(boards[board.boardsIndex].colors[0])
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
func main() {
|
||||
baseDir, _ = filepath.Abs(filepath.Dir(os.Args[0]))
|
||||
logger = log.New(os.Stderr, "", log.Ldate|log.Ltime|log.LUTC|log.Llongfile)
|
||||
logger = log.New(os.Stderr, "", log.Ldate|log.Ltime|log.LUTC|log.Lshortfile)
|
||||
logFile, err := os.OpenFile(baseDir+"/go-tetris.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644)
|
||||
if err != nil {
|
||||
logger.Fatal("opening log file error:", err)
|
||||
|
|
|
@ -22,7 +22,7 @@ func TestMain(m *testing.M) {
|
|||
}
|
||||
|
||||
func setupForTesting() {
|
||||
logger = log.New(os.Stdout, "", log.Ldate|log.Ltime|log.LUTC|log.Llongfile)
|
||||
logger = log.New(os.Stdout, "", log.Ldate|log.Ltime|log.LUTC|log.Lshortfile)
|
||||
|
||||
rand.Seed(1)
|
||||
|
||||
|
|
Loading…
Reference in New Issue