Skip to content

Commit

Permalink
Rename logging instance
Browse files Browse the repository at this point in the history
After all it is not only the GUI that uses this name.
  • Loading branch information
reisecker committed Feb 13, 2022
1 parent 18fdcc9 commit 780489c
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions snowmicropyn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ def githash():


# Log version and its git hash when module is imported
log = logging.getLogger('pyngui')
log = logging.getLogger('snowmicropyn')
log.info('snowmicropyn Version {}, Git Hash {}'.format(__version__, githash()))

from .profile import Profile
from .pnt import Pnt

from .derivatives import parameterizations
proksch2015 = parameterizations['P2015'] # backwards compatibility to < v1.1.0
from .derivatives import parameterizations as params # global access to our parameterizations
proksch2015 = params['P2015'] # backwards compatibility to < v1.1.0
2 changes: 1 addition & 1 deletion snowmicropyn/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from .tools import downsample, smooth

log = logging.getLogger('pyngui')
log = logging.getLogger('snowmicropyn')


def detect_ground(profile):
Expand Down
2 changes: 1 addition & 1 deletion snowmicropyn/loewe2012.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from .windowing import chunkup

log = logging.getLogger('pyngui')
log = logging.getLogger('snowmicropyn')

#: Default value for SnowMicroPen's cone diameter im mm.
SMP_CONE_DIAMETER = 5 # [mm]
Expand Down
2 changes: 1 addition & 1 deletion snowmicropyn/pnt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from collections import namedtuple
from enum import Enum

log = logging.getLogger('pyngui')
log = logging.getLogger('snowmicropyn')

pnt_header_entry = namedtuple('pnt_header_field', ['value', 'unit'])

Expand Down
2 changes: 1 addition & 1 deletion snowmicropyn/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from .pnt import Pnt

log = logging.getLogger('pyngui')
log = logging.getLogger('snowmicropyn')

class Profile(object):
""" Represents a loaded pnt file.
Expand Down
2 changes: 1 addition & 1 deletion snowmicropyn/pyngui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def main():
app.setApplicationName(APP_NAME.replace(' ', '_').lower())
app.setApplicationVersion(VERSION)

logger = logging.getLogger('pyngui')
logger = logging.getLogger('snowmicropyn')
logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler(stream=sys.stdout))
logger.addHandler(LogWindow()) # do not keep LogWindow in scope manually --> crashes
Expand Down
2 changes: 1 addition & 1 deletion snowmicropyn/pyngui/export_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from PyQt5.QtWidgets import QWidget, QLineEdit, QFormLayout, QHBoxLayout, QVBoxLayout, \
QLabel, QDialogButtonBox, QDialog, QVBoxLayout

log = logging.getLogger('pyngui')
log = logging.getLogger('snowmicropyn')

_LINEEDIT_WIDTH = 50

Expand Down
2 changes: 1 addition & 1 deletion snowmicropyn/pyngui/kml.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

log = logging.getLogger('pyngui')
log = logging.getLogger('snowmicropyn')

_basics = """
<?xml version="1.0" encoding="UTF-8"?>
Expand Down
2 changes: 1 addition & 1 deletion snowmicropyn/pyngui/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from snowmicropyn.pyngui.superpos_canvas import SuperposCanvas
from snowmicropyn.derivatives import parameterizations

log = logging.getLogger('pyngui')
log = logging.getLogger('snowmicropyn')

class MainWindow(QMainWindow):
SETTING_LAST_DIRECTORY = 'MainFrame/last_directory'
Expand Down
2 changes: 1 addition & 1 deletion snowmicropyn/pyngui/plot_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure

log = logging.getLogger('pyngui')
log = logging.getLogger('snowmicropyn')


class PlotCanvas(FigureCanvas):
Expand Down
2 changes: 1 addition & 1 deletion snowmicropyn/pyngui/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from PyQt5.QtWidgets import QWidget, QCheckBox, QComboBox, QLineEdit, QRadioButton, QFormLayout, QHBoxLayout, \
QVBoxLayout, QButtonGroup, QLabel, QDialogButtonBox, QGroupBox, QDialog

log = logging.getLogger('pyngui')
log = logging.getLogger('snowmicropyn')

_GAP = 20
_LINEEDIT_WIDTH = 50
Expand Down
2 changes: 1 addition & 1 deletion snowmicropyn/pyngui/sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from PyQt5.QtGui import QIcon, QDoubleValidator
from PyQt5.QtWidgets import QTreeWidget, QTreeWidgetItem, QLineEdit, QPushButton, QLabel

log = logging.getLogger('pyngui')
log = logging.getLogger('snowmicropyn')


class SidebarWidget(QTreeWidget):
Expand Down
2 changes: 1 addition & 1 deletion snowmicropyn/pyngui/superpos_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure

log = logging.getLogger('pyngui')
log = logging.getLogger('snowmicropyn')


class SuperposCanvas(FigureCanvas):
Expand Down

0 comments on commit 780489c

Please sign in to comment.