Hi, I have this code in dlogging.py in the modules folder of my app :
import logging import logging.handlers def get_configured_logger(name): global logger logger = logging.getLogger(name) if len(logger.handlers) == 0: fh = logging.FileHandler(os.path.join('/'.join(os.path.realpath( __file__).split('/')[:-3]), 'logs/system.log')) formatter = logging.Formatter('%(asctime)s - %(levelname)s %(message)s') fh.setFormatter(formatter) logger.addHandler(fh) logger.setLevel(logging.DEBUG) return logger logger = get_configured_logger('web2py.app.system') I don't understand why it works in the shell but not from web2py from inside a module class. Could anybody figure why ? Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.