-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
Hello,
I'm trying to run a script using python standard library 'logging'. This script works fine from the command line but when run from Spyder, no log is printed.
My configuration is:
Windows 7
Python 2.7.10 :: Anaconda 2.3.0 (64-bit)
spyder-app 2.3.5.2
The script is:
# -*- coding: utf-8 -*-
"""
Simple test using logging
"""
import logging
# Logger configuration:
log_level = logging.DEBUG
log_format = '%(levelname)s:%(message)s'
# Testing logger
logger = logging.root
logger.basicConfig = logging.basicConfig(format=log_format, filename='test.log', level=log_level)
logger.info('Testing logger (info)')
logger.debug('Testing logger (debug)')
logger.warning('Testing logger (warn)')
logger.info("")Reactions are currently unavailable