4 Star 18 Fork 3

五十风 / liteAuth

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
twisted_config.py 695 Bytes
一键复制 编辑 原始数据 按行查看 历史
import os
import sys
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
from twisted.logger import textFileLogObserver, ILogObserver
from twisted.application import service
from twisted.python.logfile import LogFile
import config
from lite_auth_ldap.service import LiteAutLDAPService
application = service.Application("LiteAuth LDAP Application")
if not config.DEBUG:
f = LogFile('ldap.log', config.LOG_PATH, rotateLength=config.LOG_MAX_BYTES, maxRotatedFiles=config.LOG_BACKUP_COUNT)
application.setComponent(ILogObserver, textFileLogObserver(f))
ip, port = config.LDAP_LISTEN.split(':')
service = LiteAutLDAPService(int(port), ip)
service.setServiceParent(application)
Python
1
https://gitee.com/gojuukaze/liteAuth.git
git@gitee.com:gojuukaze/liteAuth.git
gojuukaze
liteAuth
liteAuth
master

搜索帮助