GEPS008: Re-structure GUI logger files

svn: r19726
This commit is contained in:
Nick Hall 2012-05-31 15:22:03 +00:00
parent 5e6f747016
commit e2fc155240
13 changed files with 19 additions and 23 deletions

View File

@ -125,6 +125,7 @@ src/gui/editors/displaytabs/Makefile
src/gui/filters/Makefile
src/gui/filters/sidebar/Makefile
src/gui/glade/Makefile
src/gui/logger/Makefile
src/gui/merge/Makefile
src/gui/plug/Makefile
src/gui/plug/report/Makefile
@ -132,7 +133,6 @@ src/gui/selectors/Makefile
src/gui/views/Makefile
src/gui/views/treemodels/Makefile
src/gui/widgets/Makefile
src/GrampsLogger/Makefile
src/docgen/Makefile
src/Simple/Makefile
src/GrampsLocale/Makefile

View File

@ -305,7 +305,7 @@ def by_time(first, second):
return cmp(second.get_time(), first.get_time())
from GrampsLogger import RotateHandler
from gui.logger import RotateHandler
class WarnHandler(RotateHandler):

View File

@ -7,7 +7,6 @@ SUBDIRS = \
docgen \
gen \
GrampsLocale \
GrampsLogger \
gui \
images \
plugins \

View File

@ -8,6 +8,7 @@ SUBDIRS = \
editors \
filters \
glade \
logger \
merge \
plug \
selectors \

View File

@ -26,4 +26,5 @@ Package init for the gui package.
# DO NOT IMPORT METHODS/CLASSES FROM src/gui HERE ! Only __all__
__all__ = [ "editors", "filters", "merge", "selectors", "views", "widgets" ]
__all__ = [ "editors", "filters", "logger", "merge", "selectors", "views",
"widgets" ]

View File

@ -269,7 +269,7 @@ def __startgramps(errors, argparser):
sys.exit(1)
# add gui logger
from GrampsLogger import RotateHandler, GtkHandler
from gui.logger import RotateHandler, GtkHandler
form = logging.Formatter(fmt="%(relativeCreated)d: %(levelname)s: "
"%(filename)s: line %(lineno)d: %(message)s")
# Create the log handlers

View File

@ -5,19 +5,19 @@
# If not using GNU make, then list all .py files individually
pkgpython_PYTHON = \
_ErrorReportAssistant.py\
_ErrorView.py\
_GtkHandler.py\
_errorreportassistant.py\
_errorview.py\
_gtkhandler.py\
__init__.py\
_RotateHandler.py
_rotatehandler.py
pkgpyexecdir = @pkgpyexecdir@/GrampsLogger
pkgpythondir = $(datadir)/@PACKAGE@/GrampsLogger
pkgpyexecdir = @pkgpyexecdir@/gui/logger
pkgpythondir = $(datadir)/@PACKAGE@/gui/logger
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
GRAMPS_PY_MODPATH = "../"
GRAMPS_PY_MODPATH = "../../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \

View File

@ -18,7 +18,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# GrampsLogger/__init__.py
# $Id$
"""
@ -41,7 +40,7 @@ Usage:
Simple example:
from GrampsLogger import GtkHandler, RotateHandler
from gui.logger import GtkHandler, RotateHandler
rh = RotateHandler(capacity=20)
rh.setLevel(logging.DEBUG)
@ -65,5 +64,5 @@ Usage:
"""
from _GtkHandler import GtkHandler
from _RotateHandler import RotateHandler
from _gtkhandler import GtkHandler
from _rotatehandler import RotateHandler

View File

@ -18,7 +18,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# GrampsLogger/_ErrorReportAssistant.py
# $Id$
from gen.ggettext import gettext as _

View File

@ -18,7 +18,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# GrampsLogger/_ErrorView.py
# $Id$
#-------------------------------------------------------------------------
@ -35,7 +34,7 @@ import gtk
#-------------------------------------------------------------------------
import const
from gen.ggettext import sgettext as _
from _ErrorReportAssistant import ErrorReportAssistant
from _errorreportassistant import ErrorReportAssistant
import GrampsDisplay
#-------------------------------------------------------------------------

View File

@ -18,13 +18,12 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# GrampsLogger/_GtkHandler.py
# $Id$
import logging
from _ErrorView import ErrorView
from _errorview import ErrorView
class GtkHandler(logging.Handler):

View File

@ -18,7 +18,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# GrampsLogger/_RotateHandler.py
# $Id$
import logging

View File

@ -116,7 +116,7 @@ def startqml(errors, argparser):
sys.exit()
# add gui logger
from GrampsLogger import RotateHandler
from gui.logger import RotateHandler
form = logging.Formatter(fmt="%(relativeCreated)d: %(levelname)s: "
"%(filename)s: line %(lineno)d: %(message)s")
# Create the log handlers