AW: Re: Privacy IDEA don't write log's

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
https://docs.python.org/2/library/logging.config.html#configuration-file-format
Kind regardsCornelius

Cornelius KölbelCornelius.koelbel@netknights.it+49 151 2960 1417
NetKnights GmbHhttp://netknights.itLandgraf-Karl-Str. 19, 34131 Kassel, GermanyTel: +49 561 3166797, Fax: +49 561 3166798
Amtsgericht Kassel, HRB 16405Geschäftsführer: Cornelius Kölbel-------- Ursprüngliche Nachricht --------
Von: rtcw2002 rtcw2002@gmail.com
Datum: 06.08.2015 14:55 (GMT+01:00)
An: privacyidea privacyidea@googlegroups.com
Betreff: Re: Privacy IDEA don’t write log’s

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 :wink:

Regards

Tom

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+unsubscribe@googlegroups.com.

To post to this group, send email to privacyidea@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/privacyidea/a2e4a188-921e-47a2-8a93-33289915705d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.