Tentacle writes all logs in the default log file instead of the instance log file #739
Open
1 task done
Labels
team/server-at-scale
Represents the Server at Scale team under the Hosting & Execution Group
Team
What happened?
When starting Tentacle, sometimes it will log in the
OctopusTentacle.txt
file located in the default location (which is used by all Tentacles on that machine) rather than theOctopusTentacle.txt
file located in the instance-specific directory.Because logging should occur in the instance specific directory, this bug can make it looks like logging is not working. Whereas really it is (just in a different log file).
Reproduction
We have found that this will happen whenever something causes instance loading to throw an exception. For example, adding and deleting lots of instances when one instance is trying to start up.
Error and Stacktrace
No response
More Information
The issue stems from where we initialize logging. We only initialize logging correctly if we successfully determine if we can load the current instance.
But while determining if we can load the current instance, if the error comes from something unrelated to loading our instance, it will fail the whole method and leave logging as it is (i.e. going to the default location).
Workaround
No response
The text was updated successfully, but these errors were encountered: