Comments (2)
How do we handle a program that does:
while True:
log('JUNK!\n')
On Tue, Aug 11, 2015 at 11:12 AM, aaaaalbert [email protected]
wrote:
repy.py currently takes two optional command-line arguments to control
certain aspects of logging, set by the nodemanager
https://github.com/SeattleTestbed/nodemanager/blob/master/nmAPI.py#L379-L388
when launching a sandbox:
- The --logfile option
https://github.com/SeattleTestbed/repy_v2/blob/master/repy.py#L34
controls where things go that sandboxed programs print using the log()
RepyV2 call, and- the --servicelog option
https://github.com/SeattleTestbed/repy_v2/blob/master/repy.py#L40
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
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?
—
Reply to this email directly or view it on GitHub
#103.
from repy_v2.
I'll assume we let this snippet run as a sandboxed program. Then, depending on how it is started,
- Running it without the
--logfile
arg (as is typical in interactive / command line use). it just prints tostdout
, with the appropriate nannylograte
. - If the
--logfile
arg is given when the sandbox is started, then the output is redirected to the log file, rate-limited, rotated, etc.
The arg is usually only passed when the nodemanager starts the sandbox.
from repy_v2.
Related Issues (20)
- `repy.py` option parser consumes arguments meant for the sandboxed program HOT 7
- Clarify `repy.py` --logfile option help string HOT 5
- Should RepyV2 ever set `callfunc = "exit"`? HOT 2
- lack of netstat on modern versions of Linux
- Docs: Verify RepyV2 tutorial steps, code, etc. HOT 2
- Large UDP messages crash the sandbox HOT 5
- Promote warnings to errors? HOT 7
- `CheckNode/StrException`s in `safe.py` need better messages HOT 1
- Check for previously noted socket race condition
- Unmounting a live sandbox filesystem?
- Unit tests: Refactor ut_repyv2api_filecloseconcurrecy.py
- Unit tests: ut_repyv2api_commandlineargs.py leaves dangling Repy processes
- `SafeDict.update` needs `hasattr` HOT 3
- `namespace._copy` trips on `dict` values that are `type`s HOT 4
- `Exception` in a sandbox is not Python's `Exception` HOT 1
- `NameError` inside a virtual namespace causes Internal Error HOT 1
- Code safety error when Exception object has an `e.lineno` of `None`
- Fix issue references in comments HOT 2
- File object with input parameter long
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from repy_v2.