-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TouchRunner] Improve logging output.
When asked to write logs to a TCP host:port, and given multiple hostnames, we try to connect to all of them to see which hostname works. This logic does not necessarily work when asked to write to a http host:port (it would have to be implemented), which means that when given multiple hostnames, we'd enter a special case, not connecting to anything, and soon throwing a NullReferenceException. So refactor the logic slightly: we now only try to select the hostname when asked to write to a TCP host:port; when asked to write to a HTTP host:port we just select the first hostname (which is still better than throwing a NRE). We also don't unnecessarily try to resolve hostnames when asked to write logs to a file, and make absolutely sure there's no way to not have a log to write to by writing to Console.Out if we can't do anything else.
- Loading branch information
1 parent
8f1e19d
commit b5b227e
Showing
1 changed file
with
52 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters