docker-offlineimap/offlineimap/ui/Noninteractive.py
Sebastian Spaeth cbec8bb5b2 Rework UI system to make use of the logging module
Logging was flawed as the output was e.g. heavily buffered and people
complained about missing log entries. Fix this by making use of the
standard logging facilities that offlineimap offers.

This is one big ugly patch that does many things. It fixes the
Blinkenlights backend to work again with the logging facilities.

Resize windows and hotkeys are still not handled absolut correctly, this
is left for future fixing. THe rest of the backends should be working fine.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-27 16:23:55 +02:00

30 lines
1.2 KiB
Python

# Noninteractive UI
# Copyright (C) 2002-2011 John Goerzen & contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import logging
from UIBase import UIBase
class Basic(UIBase):
"""'Quiet' simply sets log level to INFO"""
def __init__(self, config, loglevel = logging.INFO):
return super(Basic, self).__init__(config, loglevel)
class Quiet(UIBase):
"""'Quiet' simply sets log level to WARNING"""
def __init__(self, config, loglevel = logging.WARNING):
return super(Quiet, self).__init__(config, loglevel)