Commit Graph

3 Commits

Author SHA1 Message Date
Eric Promislow
d1fbc00b82 Stop using and testing the intermediate function.
Directly test the exported ListenAndServe function.
2024-08-29 12:44:36 -07:00
Eric Promislow
6b9fa231ef Do all the testing in the top-level Test* functions. 2024-08-28 13:45:11 -07:00
Eric Promislow
a594876867 Keep the logger 'WriterLevel' in sync with the logger's own level.
Add a 'DisplayServerLogs' field.

When this option is true, all logs from the http.Server are displayed as errors.

This makes sense, because the docs for 'http.Server.ErrorLog' says mostly error messages
are written to it.

Unit tests need to use mutexes so we can have the logger write to a wrapped buffer
and safely read from it after writing is finished.
2024-08-28 12:52:03 -07:00