2013-07-09 55 views

回答

1

我認爲你應該設置你的SysLogHandlerCELERY_REDIRECT_STDOUTSCELERY_REDIRECT_STDOUTS_LEVEL默認與當前記錄器一起工作。

你可以嘗試實例以便(遠程SERVERT):

import logging 
from logging.handlers import SysLogHandler 

logger = logging.getLogger() 
logger.setLevel(logging.INFO) 
# host is your server that used for the log 
syslog = SysLogHandler(address=(host, port)) 
formatter = logging.Formatter('%(name)s: %(levelname)s %(message)s') 
syslog.setFormatter(formatter) 
logger.addHandler(syslog) 

# check it 
logger.info("Test test")