stormpath / stormpath-flask

Build simple, secure web applications with Stormpath and Flask!
http://flask-stormpath.readthedocs.org/en/latest/
Other
155 stars 31 forks source link

Add logging functionality #96

Open jcass77 opened 7 years ago

jcass77 commented 7 years ago

I think it would be useful if stormpath-flask logged important events (e.g. new user created, passwords changed, login / logout, etc).

Users of the stormpath-flask extension could then set the logging level and add an appropriate handler with something like:

logger = logging.getLogger('stormpath')
logger.setLevel(logging.WARNING)
handler = RotatingFileHandler(my_app.config, mode='a', maxBytes=1000000, backupCount=3)
logger.addHandler(handler)