awslabs / awslabs/amazon-kinesis-client-python

ERROR s.a.k.multilang.DrainChildSTDERRTask [NONE] - Received error line from subprocess for shard shardId-000000000000

Aperta
#116 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
377
Fork
228
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I am using the KCL library in Python and logging the information as below:

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(name)
logger.info("some logger info message")

From the above code, I am expecting to display the information as INFO in Log file, but it is showing as below:

[multi-lang-daemon-0001] ERROR s.a.k.multilang.DrainChildSTDERRTask [NONE] - Received error line from subprocess [INFO:some logger info message] for shard shardId-000000000000 some logger info message

It is logging the message twice. I have looked at the DrainChildSTDERRTask.HandleLineResult handleLine(String line) and understand that it logging to logger and JVM.

@Override protected HandleLineResult handleLine(String line) { log.error("Received error line from subprocess [{}] for shard {}", line, getShardId()); System.err.println(line); return new HandleLineResult(); }

I have two questions:

Why my logger.info is going to DrainChildSTDERRTask class though it is not an error?
Is logging twice necessary as it is filling the log quickly when it processes loads of streaming messages?

Not sure if this is an error in the KCL library or I am missing something when setting up the configuration in the python code.

Also in the sample_kcl_app you are writing to the sys.stderr is that the expected behaviour?
def log(self, message): sys.stderr.write(message)

It would be great if someone can help with this one!

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia da DrainChildSTDERRTask.handleLine(String line) e dalla configurazione Python logging.basicConfig descritta nel report. Riproduci l'output con sample_kcl_app, incluso il suo logging su sys.stderr, quindi determina se l'output ERROR duplicato è previsto e quale configurazione o comportamento della libreria dovrebbe cambiare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, python
Ambito
stream-processing
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.