Browse Source

kekekeks-evhttp-sharp Updated setup.py for logging

Added stderr/stdout file handles to the start/stop scripts.
Mike Smith 11 years ago
parent
commit
e8f6b72566
1 changed files with 6 additions and 6 deletions
  1. 6 6
      evhttp-sharp/setup.py

+ 6 - 6
evhttp-sharp/setup.py

@@ -6,23 +6,23 @@ import os
 root = os.getcwd() + "/evhttp-sharp"
 root = os.getcwd() + "/evhttp-sharp"
 app = root + "/src"
 app = root + "/src"
 
 
-def start(args):
+def start(args, logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 1
     return 1
 
 
   try:
   try:
     # build
     # build
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app)
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app)
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stdout=logfile, stderr=errfile)
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app stdout=logfile, stderr=errfile)
     
     
-    subprocess.Popen("mono -O=all bin/Release/EvHttpSharpBenchmark.exe 127.0.0.1 8085 " + str(args.max_threads) + " &", shell=True, cwd=app)
+    subprocess.Popen("mono -O=all bin/Release/EvHttpSharpBenchmark.exe 127.0.0.1 8085 " + str(args.max_threads) + " &", shell=True, cwd=app, stdout=logfile, stderr=errfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def stop():
+def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 0
     return 0
   
   
   subprocess.check_call("pkill -9 mono", shell=True)
   subprocess.check_call("pkill -9 mono", shell=True)
-  return 0
+  return 0