Skip to content

Commit

Permalink
task: implement logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdcr committed May 10, 2018
1 parent 37fd1c6 commit a5e3b0d
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions whipper/extern/task/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
# You should have received a copy of the GNU General Public License
# along with whipper. If not, see <http://www.gnu.org/licenses/>.

import logging
import sys

import gobject

logger = logging.getLogger(__name__)


class TaskException(Exception):
"""
Expand Down Expand Up @@ -70,21 +73,14 @@ class LogStub(object):
I am a stub for a log interface.
"""

# log stubs
def log(self, message, *args):
pass
logger.info(message, *args)

def debug(self, message, *args):
pass

def info(self, message, *args):
pass
logger.debug(message, *args)

def warning(self, message, *args):
pass

def error(self, message, *args):
pass
logger.warning(message, *args)


class Task(LogStub):
Expand Down

0 comments on commit a5e3b0d

Please sign in to comment.