projects
/
certmaster.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
turn off auto-starting certmaster
[certmaster.git]
/
certmaster
/
logger.py
diff --git
a/certmaster/logger.py
b/certmaster/logger.py
old mode 100755
(executable)
new mode 100644
(file)
index
b2d14ed
..
f5d79c6
--- a/
certmaster/logger.py
+++ b/
certmaster/logger.py
@@
-33,14
+33,14
@@
class Logger(Singleton):
def __init__(self, logfilepath ="/var/log/certmaster/certmaster.log"):
config_file = '/etc/certmaster/minion.conf'
def __init__(self, logfilepath ="/var/log/certmaster/certmaster.log"):
config_file = '/etc/certmaster/minion.conf'
- self.config = read_config(config_file, CMConfig)
+ self.config = read_config(config_file, CMConfig)
self.loglevel = logging._levelNames[self.config.log_level]
self._setup_logging()
if self._no_handlers:
self._setup_handlers(logfilepath=logfilepath)
self.loglevel = logging._levelNames[self.config.log_level]
self._setup_logging()
if self._no_handlers:
self._setup_handlers(logfilepath=logfilepath)
-
+
def _setup_logging(self):
def _setup_logging(self):
- self.logger = logging.getLogger("
svc
")
+ self.logger = logging.getLogger("
certmaster
")
def _setup_handlers(self, logfilepath="/var/log/certmaster/certmaster.log"):
handler = logging.FileHandler(logfilepath, "a")
def _setup_handlers(self, logfilepath="/var/log/certmaster/certmaster.log"):
handler = logging.FileHandler(logfilepath, "a")
@@
-54,18
+54,19
@@
class Logger(Singleton):
class AuditLogger(Singleton):
_no_handlers = True
def __init__(self, logfilepath = "/var/log/certmaster/audit.log"):
class AuditLogger(Singleton):
_no_handlers = True
def __init__(self, logfilepath = "/var/log/certmaster/audit.log"):
+ self.logfilepath = logfilepath
self.loglevel = logging.INFO
self._setup_logging()
if self._no_handlers:
self._setup_handlers(logfilepath=logfilepath)
self.loglevel = logging.INFO
self._setup_logging()
if self._no_handlers:
self._setup_handlers(logfilepath=logfilepath)
- def log_call(self, ip,
CN, cert_hash,
method, params):
+ def log_call(self, ip, method, params):
# square away a good parseable format at some point -akl
# square away a good parseable format at some point -akl
- self.logger.info("%s
%s %s %s called with %s" % (ip, CN, cert_hash
, method, params))
+ self.logger.info("%s
called %s with %s" % (ip
, method, params))
def _setup_logging(self):
def _setup_logging(self):
- self.logger = logging.getLogger("audit")
+ self.logger = logging.getLogger("
certmaster-
audit")
def _setup_handlers(self, logfilepath="/var/log/certmaster/audit.log"):
handler = logging.FileHandler(logfilepath, "a")
def _setup_handlers(self, logfilepath="/var/log/certmaster/audit.log"):
handler = logging.FileHandler(logfilepath, "a")