fixed some comments and opened the logfiles in ascii rather than binary mode
This commit is contained in:
parent
875d6cf282
commit
b4728f3f93
@ -83,15 +83,13 @@ def Main():
|
||||
parser.add_argument( '--stderr', type = str, default = None,
|
||||
help = 'optional file to use for stderr' )
|
||||
parser.add_argument( '--keep_logfiles', action = 'store_true', default = None,
|
||||
help = 'optional file to use for stderr' )
|
||||
help = 'retain logfiles after the server exits' )
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.stdout is not None:
|
||||
sys.stdout = open(args.stdout, "wb")
|
||||
#os.dup2(stdout.fileno(), sys.stdout.fileno())
|
||||
sys.stdout = open(args.stdout, "w")
|
||||
if args.stderr is not None:
|
||||
sys.stderr = open(args.stderr, "wb")
|
||||
#os.dup2(stderr.fileno(), sys.stderr.fileno())
|
||||
sys.stderr = open(args.stderr, "w")
|
||||
|
||||
numeric_level = getattr( logging, args.log.upper(), None )
|
||||
if not isinstance( numeric_level, int ):
|
||||
|
Loading…
Reference in New Issue
Block a user