math-optim/algo/ga/log.go
leo 3d83683b8b
All checks were successful
continuous-integration/drone/push Build is passing
add ga (Genetic Algorightms) package
2023-02-11 20:04:02 +01:00

18 lines
459 B
Go

// Copyright 2023 wanderer <a_mirre at utb dot cz>
// SPDX-License-Identifier: GPL-3.0-or-later
package ga
import (
"log"
"os"
)
// gaLogger declares and initialises a "custom" ga logger.
var gaLogger = log.New(os.Stderr, " *** Γ ga:", log.Ldate|log.Ltime|log.Lshortfile)
// newLogger can be used to get a logger with a custom prefix.
func newLogger(prefix string) *log.Logger {
return log.New(os.Stderr, prefix, log.Ldate|log.Ltime|log.Lshortfile)
}