Open esumerfd opened 2 years ago
Thanks for reporting!
SCRATCH THIS: bad info: config.go:694 should reference ac.internalLogFilename instead of hard coding "internal.log"
Now perhaps I understand. Perhaps if the os.Open was an OpenFile with a O_CREATE option it would create the custom file name.
I can make it work by touching the file before running then it choose it. Feels like the flows for selecting the default filename may need to be done before the open.
// Direct internal logging elsewhere
internalLogFile, err := os.Open(ac.internalLogFilename)
if err != nil {
// Could not open the internalLogFilename filename, try using another filename
internalLogFile, err = os.OpenFile("internal.log", os.O_CREATE|os.O_APPEND|os.O_WRONLY, ac.defaultPermissions)
Starting the server like this:
Writes the internal log to a file called internal.log while the ServerInfo() says
: algernon --version Algernon 1.14.0