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()
}
// 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])

View File

@ -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)

View File

@ -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)