Privacy IDEA don't write log's

69 views
Skip to first unread message

rtcw2002

unread,
Aug 4, 2015, 9:10:05 AM8/4/15
to privacyidea
Hi

I installded Privacyidea on Ubuntu 14.04 LTS.
Installation was easy,

The First Config of Freeradius was a.p.i.t.a, yo know.

After a Weekfull of frustration  i reinstall Ubuntu  and PI ( 4 times)

Evertime the same two Issue.

Smtptosms not work and first, i'ts not possible to troubleshoot without any logs ;-)

I'ver checked :

/privacyidea/config.py

class Config:

    PI_LOGFILE = "privacyidea.log"
    PI_LOGLEVEL = logging.DEBUG
    PI_LOGCONFIG = "/etc/privacyidea/logging.cfg"


/etc/privacyidea/pi.cfg

PI_AUDIT_KEY_PRIVATE = '/etc/privacyidea/private.pem'
PI_AUDIT_KEY_PUBLIC = '/etc/privacyidea/public.pem'
PI_LOGFILE = '/var/log/privacyidea/privacyidea.log'
PI_LOGCONFIG = "/etc/privacyidea/logging.cfg"
#PI_LOGLEVEL = logging.INFO
PI_LOGLEVEL = 10


and

/etc/privacyidea/logging.cfg

[frmatters]
keys=detail

[handlers]
keys=file,mail

[formatter_detail]
class=privacyidea.lib.log.SecureFormatter
format=[%(asctime)s][%(process)d][%(thread)d][%(levelname)s][%(name)s:%(lineno)d] %(message)s

[handler_mail]
class=logging.handlers.SMTPHandler
level=ERROR
formatter=detail
args=('mail.company.com', myn...@company.com', 'PI Error')

[handler_file]
# Rollover the logfile at midnight
class=logging.handlers.RotatingFileHandler
backupCount=14
maxBytes=10000000
formatter=detail
level=DEBUG
args=('/var/log/privacyidea/privacyidea.log',)

[loggers]
keys=root,privacyidea

[logger_privacyidea]
handlers=file,mail
qualname=privacyidea
level=DEBUG

[logger_root]
level=NOTSET
handlers=file



Any Ideas ?


Tom

Cornelius Kölbel

unread,
Aug 4, 2015, 3:14:49 PM8/4/15
to privacyidea

Hi Tom,
please start by omitting logging.conf and use version 2.5.

Kind regards Cornelius 


Cornelius Kölbel
+49 151 2960 1417

NetKnights GmbH
Landgraf-Karl-Str. 19, 34131 Kassel, Germany

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel


-------- Ursprüngliche Nachricht --------
Von: rtcw2002 <rtcw...@gmail.com>
Datum: 04.08.2015 15:10 (GMT+01:00)
An: privacyidea <priva...@googlegroups.com>
Betreff: Privacy IDEA don't write log's
--
You received this message because you are subscribed to the Google Groups "privacyidea" group.
To unsubscribe from this group and stop receiving emails from it, send an email to privacyidea...@googlegroups.com.
To post to this group, send email to priva...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/privacyidea/405f2a4b-7b4b-4759-804c-9826541a9553%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

rtcw2002

unread,
Aug 6, 2015, 8:55:10 AM8/6/15
to privacyidea
Hi Cornelius

Than you.

After Reinstallation without succes i try with loging.cfg as followed:

[formatters]
keys=detail

[handlers]
keys=file


[formatter_detail]
class=privacyidea.lib.log.SecureFormatter
format=[%(asctime)s][%(process)d][%(thread)d][%(levelname)s][%(name)s:%(lineno)d] %(message)s

[handler_mail]
class=logging.handlers.SMTPHandler
level=ERROR
formatter=detail
args=('PI Error')


[handler_file]
# Rollover the logfile at midnight
class=logging.handlers.RotatingFileHandler
backupCount=14
maxBytes=10000000
formatter=detail
level=DEBUG
args=('/var/log/privacyidea/privacyidea.log',)

[loggers]
keys=root,privacyidea

[logger_privacyidea]
handlers=file
qualname=privacyidea
level=DEBUG

[logger_root]
level=NOTSET
handlers=file




Well, aer restart Apache ,the logfile will be bigge and bigger ;-)

Regards

Tom

Cornelius Kölbel

unread,
Aug 7, 2015, 1:31:37 AM8/7/15
to privacyidea
Hi Tom,

Defining sections with different qualname (like privacyidea.lib.user or privacyidea.api - any python module) you can specify the log Level of each module. This way you could only log certain library functions reducing the amount of log output.

You read more on python logging


Kind regards
Cornelius


Cornelius Kölbel
+49 151 2960 1417

NetKnights GmbH
Landgraf-Karl-Str. 19, 34131 Kassel, Germany

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel


-------- Ursprüngliche Nachricht --------
Von: rtcw2002 <rtcw...@gmail.com>
Datum: 06.08.2015 14:55 (GMT+01:00)
An: privacyidea <priva...@googlegroups.com>
Betreff: Re: Privacy IDEA don't write log's
--
You received this message because you are subscribed to the Google Groups "privacyidea" group.
To unsubscribe from this group and stop receiving emails from it, send an email to privacyidea...@googlegroups.com.
To post to this group, send email to priva...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages