Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trollstalker ignores logging config, instead writes "yep, processed" to stdout for every file #158

Open
gerritholl opened this issue Nov 12, 2024 · 2 comments

Comments

@gerritholl
Copy link
Member

The package 'trollstalker' ignores the logging configuration. Instead, for every file coming it, it prints a message "yep, processed" to stdout.

$ trollstalker.py -c trollstalker.ini -C fci-fdhsi-fd -n localhost

gives

yep, processed
yep, processed
yep, processed
yep, processed
yep, processed

and so on. Meanwhile, the corresponding logging file does not get created.

Configuration file (relevant part):

[fci-fdhsi-fd]
topic=/file/fci/fdhsi-fd
directory=/data/pytroll/IN/FCI_FDHSI/
posttroll_port=0
publish_port=
event_names=IN_MOVED_TO,IN_CREATE
loglevel=DEBUG
stalker_log_config=/opt/pytroll/pytroll_inst/config/trollstalker_logging.ini
filepattern={path}W_XX-EUMETSAT-Darmstadt,IMG+SAT,{platform_name:_<4s}+FCI-1C-RRAD-FDHSI-FD--CHK-{segment:_<4s}--{purpose}-NC4E_C_EUMT_{proc_time:%Y%m%d%H%M%S}_{facility_or_tool}_{environment}_{start_time:%Y%m%d%H%M%S}_{end_time:%Y%m%d%H%M%S}_N_{special_compression}_{disposition_mode}_{repeat_cycle_in_day:>04d}_{count_in_repeat_cycle:>04d}.nc
instruments=fci
history=0
nameservers=localhost

Logging configuration:

[loggers]
keys=root,trollstalker

[handlers]
keys=consoleHandler,fileHandler

[formatters]
keys=simpleFormatter

[logger_root]
level=DEBUG
handlers=consoleHandler,fileHandler

[logger_trollstalker]
level=DEBUG
handlers=consoleHandler,fileHandler
qualname=trollstalker
propagate=0

[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=simpleFormatter
args=(sys.stdout,)

[handler_fileHandler]
class=handlers.TimedRotatingFileHandler
level=DEBUG
formatter=simpleFormatter
args=("/opt/pytroll/pytroll_inst/log/trollstalker.log", 'midnight', 1, 7, None, True, True)

[formatter_simpleFormatter]
format=[%(levelname)s: %(asctime)s: %(name)s] %(message)s
datefmt=

It was working in pytroll-collectors 0.15.1, but it fails in pytroll-collectors 0.16.

@gerritholl
Copy link
Member Author

git bisect seems to suggest the problem was introduced in 2b0ec74, although I'm not quite sure, as there was an intermediate period in which trollstalker was not functioning at all (see #149).

@gerritholl
Copy link
Member Author

  • No logging at all: since 2b0ec74
  • No logging, but at least spurious yep, processed messages: 9a998c3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant