Skip to content

Move logic to log to files from repy.py to nmAPI.py? #103

@aaaaalbert

Description

@aaaaalbert

repy.py currently takes two optional command-line arguments to control certain aspects of logging, set by the nodemanager when launching a sandbox:

  • The --logfile option controls where things go that sandboxed programs print using the log() RepyV2 call, and
  • the --servicelog option makes certain rare internal error messages from tracebackrepy.py go 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions