-
Notifications
You must be signed in to change notification settings - Fork 60
Move logic to log to files from repy.py to nmAPI.py? #103
Description
repy.py currently takes two optional command-line arguments to control certain aspects of logging, set by the nodemanager when launching a sandbox:
- The
--logfileoption controls where things go that sandboxed programs print using thelog()RepyV2 call, and - the
--servicelogoption makes certain rare internal error messages fromtracebackrepy.pygo to the nodemanager log.
This introduces complexity in the Repy sandbox, so that it imports the proper logging libraries, finds log files, does log rotation, etc.
Instead, I think that the nodemanager should take care of this by redirecting the sandbox's standard streams appropriately. The Repy sandbox would get somewhat simpler; the nodemanager and sandbox separated more clearly (see also SeattleTestbed/nodemanager#119).
Furthermore, we could support much more easily other, non-Repy sandbox types that were not built with setting up logging in mind, and have things like seash's show log work transparently for them too.
What's your impression? Is this worthwhile?