logger: Llongfile -> Lshortfile

This commit is contained in:
MichaelS11 2020-09-11 03:33:02 -07:00
parent ab91e02f03
commit 07a3313362
5 changed files with 276 additions and 276 deletions

View File

@ -49,7 +49,7 @@ func ChangeBoardSize(width int, height int) {
board.currentMino = NewMino() board.currentMino = NewMino()
} }
// Clear clears the board to orginal state // Clear clears the board to original state
func (board *Board) Clear() { func (board *Board) Clear() {
board.width = len(boards[board.boardsIndex].colors) board.width = len(boards[board.boardsIndex].colors)
board.height = len(boards[board.boardsIndex].colors[0]) board.height = len(boards[board.boardsIndex].colors[0])

View File

@ -10,7 +10,7 @@ import (
func main() { func main() {
baseDir, _ = filepath.Abs(filepath.Dir(os.Args[0])) 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) logFile, err := os.OpenFile(baseDir+"/go-tetris.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644)
if err != nil { if err != nil {
logger.Fatal("opening log file error:", err) logger.Fatal("opening log file error:", err)

View File

@ -22,7 +22,7 @@ func TestMain(m *testing.M) {
} }
func setupForTesting() { 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) rand.Seed(1)