From 2c19f4e047b70a17d74e976b0cfd35b5c0340a33 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Tue, 6 Jul 2010 13:09:23 -0400 Subject: More cleanup. I thought I removed this. --- markdown/misc_logging.py | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 markdown/misc_logging.py diff --git a/markdown/misc_logging.py b/markdown/misc_logging.py deleted file mode 100644 index 463be15..0000000 --- a/markdown/misc_logging.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -import logging -from logging import DEBUG, INFO, WARN, ERROR, CRITICAL -import sys -import warnings - -# -# Exceptions -# - -class MarkdownException(Exception): - """ A Markdown Exception. """ - pass - - -class MarkdownWarning(Warning): - """ A Markdown Warning. """ - pass - - -# -# Global functions -# - -def message(level, text): - """ A wrapper method for logging debug messages. """ - logger = logging.getLogger('MARKDOWN') - if logger.handlers: - # The logger is configured - logger.log(level, text) - if level > WARN: - sys.exit(0) - elif level > WARN: - raise MarkdownException, text - else: - warnings.warn(text, MarkdownWarning) \ No newline at end of file -- cgit v1.2.3