Message12620
I think I can get this in the beta while we're waiting to resolve the website and other things.
I'm quite liking this correspondence:
>>> for v in range(-2, 8):
... print v, Py.levelFromVerbosity(v)
...
-2 SEVERE
-1 SEVERE
0 WARNING
1 INFO
2 CONFIG
3 FINE
4 FINER
5 FINEST
6 ALL
7 ALL
These are not all valid levels in Jython, but it seems as good a response as any to other integer values to map them so. We can go the other way too:
>>> for level in (ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF):
... print level, Py.verbosityFromLevel(level)
...
ALL 6
FINEST 5
FINER 4
FINE 3
CONFIG 2
INFO 1
WARNING 0
SEVERE -1
OFF -1
Our default level (no -v flag) is 1 = MESSAGE = INFO, which is also the Java default, so it nicely produces "least surprise". I'm not sure what to do about about OFF.
I've yet to discover at what points I need to use these functions to keep things in sync, but writing them seemed a good starting point. They may not be public in a release. |
|
Date |
User |
Action |
Args |
2019-08-04 16:30:33 | jeff.allen | set | messageid: <1564936233.76.0.720936312818.issue2778@roundup.psfhosted.org> |
2019-08-04 16:30:33 | jeff.allen | set | recipients:
+ jeff.allen |
2019-08-04 16:30:33 | jeff.allen | link | issue2778 messages |
2019-08-04 16:30:33 | jeff.allen | create | |
|