5 Commits

Author SHA1 Message Date
3eed3e1058 Update revision for release
All checks were successful
Unit Testing / test (3.11) (push) Successful in 49s
Unit Testing / test (3.10) (push) Successful in 49s
Unit Testing / test (3.8) (push) Successful in 49s
Unit Testing / test (3.12) (push) Successful in 50s
Unit Testing / test (3.9) (push) Successful in 48s
2026-03-10 14:38:51 +01:00
b1188fcaab Merge pull request 'Deactivate automatic logfile writing' (#6) from logFile into main
All checks were successful
Unit Testing / test (3.10) (push) Successful in 52s
Unit Testing / test (3.11) (push) Successful in 48s
Unit Testing / test (3.8) (push) Successful in 48s
Unit Testing / test (3.12) (push) Successful in 54s
Unit Testing / test (3.9) (push) Successful in 54s
Reviewed-on: #6
2026-03-10 14:37:38 +01:00
3cd2d1a0a9 Setup logfile only in eos when command-line parameter set
All checks were successful
Unit Testing / test (3.10) (pull_request) Successful in 47s
Unit Testing / test (3.11) (pull_request) Successful in 48s
Unit Testing / test (3.8) (pull_request) Successful in 48s
Unit Testing / test (3.12) (pull_request) Successful in 48s
Unit Testing / test (3.9) (pull_request) Successful in 47s
Pull Request Merged / autoupdate_minor (pull_request) Successful in 4s
2026-03-10 14:34:17 +01:00
927a18e64b logfile nor optional 2026-03-10 13:42:59 +01:00
ffd296ef99 eos/options.py aktualisiert 2026-03-10 09:21:39 +01:00
4 changed files with 26 additions and 13 deletions

View File

@@ -2,5 +2,5 @@
Package to handle data redction at AMOR instrument to be used by __main__.py script.
"""
__version__ = '3.2.4'
__date__ = '2026-03-02'
__version__ = '3.2.5'
__date__ = '2026-03-10'

View File

@@ -10,7 +10,7 @@ import logging
# need to do absolute import here as pyinstaller requires it
from eos.options import ReflectivityConfig, ReaderConfig, ExperimentConfig, ReflectivityReductionConfig, ReflectivityOutputConfig
from eos.command_line import commandLineArgs
from eos.logconfig import setup_logging, update_loglevel
from eos.logconfig import setup_logging, update_loglevel, setup_logfile
def main():
@@ -27,6 +27,8 @@ def main():
output_config = ReflectivityOutputConfig.from_args(clas)
config = ReflectivityConfig(reader_config, experiment_config, reduction_config, output_config)
if output_config.logFile:
setup_logfile()
logging.warning('######## eos - data reduction for Amor ########')
# only import heavy module if sufficient command line parameters were provided

View File

@@ -6,7 +6,7 @@ import logging
import logging.handlers
def setup_logging():
logger = logging.getLogger() # logging.getLogger('quicknxs')
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
# rename levels to make clear warning is can be a normal message
logging.addLevelName(logging.INFO, 'VERB')
@@ -19,18 +19,22 @@ def setup_logging():
console.setLevel(logging.WARNING)
logger.addHandler(console)
# if os.path.exists('amor_eos.log'):
# rollover = True
# else:
# rollover = False
logfile = logging.handlers.RotatingFileHandler('amor_eos.log', encoding='utf8', mode='w',
maxBytes=200*1024**2, backupCount=20)
# if rollover: logfile.doRollover()
def setup_logfile():
logfile = logging.handlers.RotatingFileHandler(
'amor_eos.log',
encoding='utf8',
mode='w',
maxBytes=200*1024**2,
backupCount=20,
)
formatter = logging.Formatter(
'[%(levelname).4s] - %(asctime)s - %(filename)s:%(lineno)i:%(funcName)s %(message)s',
'')
'[%(levelname).4s] - %(asctime)s - %(filename)s:%(lineno)i:%(funcName)s %(message)s',
'',
)
logfile.setFormatter(formatter)
logfile.setLevel(logging.DEBUG)
logger = logging.getLogger()
logger.addHandler(logfile)
def update_loglevel(verbose=0):

View File

@@ -526,6 +526,13 @@ class ReflectivityOutputConfig(ArgParsable):
'help': '?',
},
)
logFile: bool = field(
default = False,
metadata = {
'group': 'output',
'help': 'write log file "amor_eos.log"',
}
)
plot: bool = field(
default=False,
metadata={