Compare commits
No commits in common. "be7627d93f8ccac64166653d6d63076c4d2a5f12" and "c521738567231ecfbafc8d0e1ea2828d07e4d433" have entirely different histories.
be7627d93f
...
c521738567
|
|
@ -32,7 +32,7 @@ from PyQt5.QtWidgets import QFileDialog, QApplication, QMessageBox
|
|||
import settings as stg
|
||||
from settings import ABS_name
|
||||
|
||||
logger = logging.getLogger("acoused")
|
||||
logger = logging.getLogger()
|
||||
|
||||
class CreateTableForSaveAs:
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ from settings import BS_raw_data, acoustic_data
|
|||
from View.acoustic_data_tab import AcousticDataTab
|
||||
|
||||
|
||||
logger = logging.getLogger("acoused")
|
||||
logger = logging.getLogger()
|
||||
|
||||
class ReadTableForOpen:
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ locale.setlocale(locale.LC_ALL, '')
|
|||
|
||||
_translate = QCoreApplication.translate
|
||||
|
||||
logger = logging.getLogger("acoused")
|
||||
logger = logging.getLogger()
|
||||
|
||||
class AcousticDataTab(QWidget):
|
||||
COMPTEUR = 1
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ import settings as stg
|
|||
|
||||
_translate = QCoreApplication.translate
|
||||
|
||||
logger = logging.getLogger("acoused")
|
||||
logger = logging.getLogger()
|
||||
|
||||
class SampleDataTab(QWidget):
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ import settings as stg
|
|||
from View.checkable_combobox import CheckableComboBox
|
||||
from Model.acoustic_inversion_method_high_concentration import AcousticInversionMethodHighConcentration
|
||||
|
||||
logger = logging.getLogger("acoused")
|
||||
logger = logging.getLogger()
|
||||
|
||||
class SedimentCalibrationTab(QWidget):
|
||||
|
||||
|
|
@ -2762,3 +2762,4 @@ class SedimentCalibrationTab(QWidget):
|
|||
self.lineEdit_slider_FCB.setText(
|
||||
str(stg.time[self.combobox_acoustic_data_choice.currentIndex()][
|
||||
self.combobox_frequency_FCB.currentIndex(), self.slider_FCB.value()-1]))
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
8
main.py
8
main.py
|
|
@ -28,13 +28,13 @@ PERCENT_SCREEN_SIZE = 0.85
|
|||
_translate = QCoreApplication.translate
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
level=logging.DEBUG,
|
||||
format=('[AcouSed][%(levelname)s] %(message)s')
|
||||
)
|
||||
|
||||
logger = logging.getLogger("acoused")
|
||||
logger.setLevel(logging.DEBUG)
|
||||
#logger.setLevel(logging.INFO)
|
||||
logger = logging.getLogger()
|
||||
# logger.setLevel(logging.DEBUG)
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
class MainApplication(QMainWindow):
|
||||
|
||||
|
|
|
|||
45
tools.py
45
tools.py
|
|
@ -1,45 +0,0 @@
|
|||
import os
|
||||
import time
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from pathlib import Path
|
||||
|
||||
from functools import wraps
|
||||
|
||||
###########
|
||||
# LOGGING #
|
||||
###########
|
||||
|
||||
logger = logging.getLogger("acoused")
|
||||
|
||||
#########
|
||||
# WRAPS #
|
||||
#########
|
||||
|
||||
def trace(func):
|
||||
@wraps(func)
|
||||
def wrapper(*args, **kwargs):
|
||||
t = time.time()
|
||||
head = f"[TRACE]"
|
||||
logger.debug(
|
||||
f"{head} Call {func.__module__}." +
|
||||
f"{func.__qualname__}({args}, {kwargs})"
|
||||
)
|
||||
|
||||
value = func(*args, **kwargs)
|
||||
|
||||
t1 = time.time()
|
||||
logger.debug(
|
||||
f"{head} Return {func.__module__}." +
|
||||
f"{func.__qualname__}: {value}"
|
||||
)
|
||||
logger.debug(
|
||||
f"{head}[TIME] {func.__module__}." +
|
||||
f"{func.__qualname__}: {t1-t} sec"
|
||||
)
|
||||
|
||||
return value
|
||||
|
||||
return wrapper
|
||||
Loading…
Reference in New Issue