Skip to content

Commit

Permalink
Merge pull request #272 from mtdcr/task-log
Browse files Browse the repository at this point in the history
task: implement logging
  • Loading branch information
JoeLametta authored May 24, 2018
2 parents 37fd1c6 + a5e3b0d commit 8fe47ed
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 8fe47ed

Please sign in to comment.