GEPS008: Re-structure GUI logger files
svn: r19726
This commit is contained in:
parent
5e6f747016
commit
e2fc155240
@ -125,6 +125,7 @@ src/gui/editors/displaytabs/Makefile
|
|||||||
src/gui/filters/Makefile
|
src/gui/filters/Makefile
|
||||||
src/gui/filters/sidebar/Makefile
|
src/gui/filters/sidebar/Makefile
|
||||||
src/gui/glade/Makefile
|
src/gui/glade/Makefile
|
||||||
|
src/gui/logger/Makefile
|
||||||
src/gui/merge/Makefile
|
src/gui/merge/Makefile
|
||||||
src/gui/plug/Makefile
|
src/gui/plug/Makefile
|
||||||
src/gui/plug/report/Makefile
|
src/gui/plug/report/Makefile
|
||||||
@ -132,7 +133,6 @@ src/gui/selectors/Makefile
|
|||||||
src/gui/views/Makefile
|
src/gui/views/Makefile
|
||||||
src/gui/views/treemodels/Makefile
|
src/gui/views/treemodels/Makefile
|
||||||
src/gui/widgets/Makefile
|
src/gui/widgets/Makefile
|
||||||
src/GrampsLogger/Makefile
|
|
||||||
src/docgen/Makefile
|
src/docgen/Makefile
|
||||||
src/Simple/Makefile
|
src/Simple/Makefile
|
||||||
src/GrampsLocale/Makefile
|
src/GrampsLocale/Makefile
|
||||||
|
@ -305,7 +305,7 @@ def by_time(first, second):
|
|||||||
return cmp(second.get_time(), first.get_time())
|
return cmp(second.get_time(), first.get_time())
|
||||||
|
|
||||||
|
|
||||||
from GrampsLogger import RotateHandler
|
from gui.logger import RotateHandler
|
||||||
|
|
||||||
class WarnHandler(RotateHandler):
|
class WarnHandler(RotateHandler):
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ SUBDIRS = \
|
|||||||
docgen \
|
docgen \
|
||||||
gen \
|
gen \
|
||||||
GrampsLocale \
|
GrampsLocale \
|
||||||
GrampsLogger \
|
|
||||||
gui \
|
gui \
|
||||||
images \
|
images \
|
||||||
plugins \
|
plugins \
|
||||||
|
@ -8,6 +8,7 @@ SUBDIRS = \
|
|||||||
editors \
|
editors \
|
||||||
filters \
|
filters \
|
||||||
glade \
|
glade \
|
||||||
|
logger \
|
||||||
merge \
|
merge \
|
||||||
plug \
|
plug \
|
||||||
selectors \
|
selectors \
|
||||||
|
@ -26,4 +26,5 @@ Package init for the gui package.
|
|||||||
|
|
||||||
# DO NOT IMPORT METHODS/CLASSES FROM src/gui HERE ! Only __all__
|
# 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" ]
|
||||||
|
@ -269,7 +269,7 @@ def __startgramps(errors, argparser):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# add gui logger
|
# add gui logger
|
||||||
from GrampsLogger import RotateHandler, GtkHandler
|
from gui.logger import RotateHandler, GtkHandler
|
||||||
form = logging.Formatter(fmt="%(relativeCreated)d: %(levelname)s: "
|
form = logging.Formatter(fmt="%(relativeCreated)d: %(levelname)s: "
|
||||||
"%(filename)s: line %(lineno)d: %(message)s")
|
"%(filename)s: line %(lineno)d: %(message)s")
|
||||||
# Create the log handlers
|
# Create the log handlers
|
||||||
|
@ -5,19 +5,19 @@
|
|||||||
# If not using GNU make, then list all .py files individually
|
# If not using GNU make, then list all .py files individually
|
||||||
|
|
||||||
pkgpython_PYTHON = \
|
pkgpython_PYTHON = \
|
||||||
_ErrorReportAssistant.py\
|
_errorreportassistant.py\
|
||||||
_ErrorView.py\
|
_errorview.py\
|
||||||
_GtkHandler.py\
|
_gtkhandler.py\
|
||||||
__init__.py\
|
__init__.py\
|
||||||
_RotateHandler.py
|
_rotatehandler.py
|
||||||
|
|
||||||
pkgpyexecdir = @pkgpyexecdir@/GrampsLogger
|
pkgpyexecdir = @pkgpyexecdir@/gui/logger
|
||||||
pkgpythondir = $(datadir)/@PACKAGE@/GrampsLogger
|
pkgpythondir = $(datadir)/@PACKAGE@/gui/logger
|
||||||
|
|
||||||
# Clean up all the byte-compiled files
|
# Clean up all the byte-compiled files
|
||||||
MOSTLYCLEANFILES = *pyc *pyo
|
MOSTLYCLEANFILES = *pyc *pyo
|
||||||
|
|
||||||
GRAMPS_PY_MODPATH = "../"
|
GRAMPS_PY_MODPATH = "../../"
|
||||||
|
|
||||||
pycheck:
|
pycheck:
|
||||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
@ -18,7 +18,6 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
# GrampsLogger/__init__.py
|
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -41,7 +40,7 @@ Usage:
|
|||||||
|
|
||||||
Simple example:
|
Simple example:
|
||||||
|
|
||||||
from GrampsLogger import GtkHandler, RotateHandler
|
from gui.logger import GtkHandler, RotateHandler
|
||||||
|
|
||||||
rh = RotateHandler(capacity=20)
|
rh = RotateHandler(capacity=20)
|
||||||
rh.setLevel(logging.DEBUG)
|
rh.setLevel(logging.DEBUG)
|
||||||
@ -65,5 +64,5 @@ Usage:
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from _GtkHandler import GtkHandler
|
from _gtkhandler import GtkHandler
|
||||||
from _RotateHandler import RotateHandler
|
from _rotatehandler import RotateHandler
|
@ -18,7 +18,6 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
# GrampsLogger/_ErrorReportAssistant.py
|
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
from gen.ggettext import gettext as _
|
from gen.ggettext import gettext as _
|
@ -18,7 +18,6 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
# GrampsLogger/_ErrorView.py
|
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -35,7 +34,7 @@ import gtk
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import const
|
import const
|
||||||
from gen.ggettext import sgettext as _
|
from gen.ggettext import sgettext as _
|
||||||
from _ErrorReportAssistant import ErrorReportAssistant
|
from _errorreportassistant import ErrorReportAssistant
|
||||||
import GrampsDisplay
|
import GrampsDisplay
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
@ -18,13 +18,12 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
# GrampsLogger/_GtkHandler.py
|
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from _ErrorView import ErrorView
|
from _errorview import ErrorView
|
||||||
|
|
||||||
|
|
||||||
class GtkHandler(logging.Handler):
|
class GtkHandler(logging.Handler):
|
@ -18,7 +18,6 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
# GrampsLogger/_RotateHandler.py
|
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
import logging
|
import logging
|
@ -116,7 +116,7 @@ def startqml(errors, argparser):
|
|||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
# add gui logger
|
# add gui logger
|
||||||
from GrampsLogger import RotateHandler
|
from gui.logger import RotateHandler
|
||||||
form = logging.Formatter(fmt="%(relativeCreated)d: %(levelname)s: "
|
form = logging.Formatter(fmt="%(relativeCreated)d: %(levelname)s: "
|
||||||
"%(filename)s: line %(lineno)d: %(message)s")
|
"%(filename)s: line %(lineno)d: %(message)s")
|
||||||
# Create the log handlers
|
# Create the log handlers
|
||||||
|
Loading…
Reference in New Issue
Block a user