Subversion Repositories SmartDukaan

Rev

Rev 19993 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19993 Rev 20125
Line 22... Line 22...
22
	def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'):
22
	def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'):
23
		self.stdin = stdin
23
		self.stdin = stdin
24
		self.stdout = stdout
24
		self.stdout = stdout
25
		self.stderr = stderr
25
		self.stderr = stderr
26
		self.pidfile = pidfile
26
		self.pidfile = pidfile
27
		#if stdout!='/dev/null':
27
		if stdout!='/dev/null':
-
 
28
			thriftLogger = logging.getLogger("thrift")
28
			#configure_logging(stdout)
29
			ch = logging.StreamHandler(sys.stdout)
-
 
30
			thriftLogger.setLevel(logging.ERROR)
-
 
31
			thriftLogger.addHandler(ch)
-
 
32
 
29
	
33
	
30
	def daemonize(self):
34
	def daemonize(self):
31
		"""
35
		"""
32
		do the UNIX double-fork magic, see Stevens' "Advanced 
36
		do the UNIX double-fork magic, see Stevens' "Advanced 
33
		Programming in the UNIX Environment" for details (ISBN 0201563177)
37
		Programming in the UNIX Environment" for details (ISBN 0201563177)