Skip to content

Commit f24a137

Browse files
author
Michael Koval
committed
Show DeprecationWarnings by default.
1 parent 1291a7c commit f24a137

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/prpy/logger.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2929
# POSSIBILITY OF SUCH DAMAGE.
3030

31-
import collections, logging, sys
31+
import collections, logging, sys, warnings
3232

3333
class ColoredFormatter(logging.Formatter):
3434
def __init__(self, default):
@@ -80,6 +80,9 @@ def initialize_logging():
8080
spammy_logger = logging.getLogger(spammy_logger_name)
8181
spammy_logger.setLevel(logging.WARNING)
8282

83+
# Enable deprecation warnings, which are off by default in Python 2.7.
84+
warnings.simplefilter('default')
85+
8386
return base_logger
8487

8588
def remove_ros_logger():

0 commit comments

Comments
 (0)