projects
/
cascardo
/
ipsilon.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use python logging in install / log cherrypy at right severity
[cascardo/ipsilon.git]
/
ipsilon
/
login
/
authtest.py
diff --git
a/ipsilon/login/authtest.py
b/ipsilon/login/authtest.py
index
5f0ff6e
..
7769650
100644
(file)
--- a/
ipsilon/login/authtest.py
+++ b/
ipsilon/login/authtest.py
@@
-20,6
+20,7
@@
from ipsilon.login.common import LoginFormBase, LoginManagerBase, \
from ipsilon.util.plugin import PluginObject
from ipsilon.util import config as pconfig
import cherrypy
from ipsilon.util.plugin import PluginObject
from ipsilon.util import config as pconfig
import cherrypy
+import logging
class TestAuth(LoginFormBase):
class TestAuth(LoginFormBase):
@@
-46,7
+47,7
@@
class TestAuth(LoginFormBase):
error = "Authentication failed"
else:
error = "Username or password is missing"
error = "Authentication failed"
else:
error = "Username or password is missing"
- cherrypy.log.error("Error: " + error)
+ cherrypy.log.error("Error: " + error
, severity=logging.ERROR
)
context = self.create_tmpl_context(
username=username,
context = self.create_tmpl_context(
username=username,
@@
-120,7
+121,7
@@
class Installer(LoginManagerInstaller):
if opts['testauth'] != 'yes':
return
if opts['testauth'] != 'yes':
return
- print self.pargs
+ logging.debug(self.pargs)
# Add configuration data to database
po = PluginObject(*self.pargs)
po.name = 'testauth'
# Add configuration data to database
po = PluginObject(*self.pargs)
po.name = 'testauth'