CoreNLP icon indicating copy to clipboard operation
CoreNLP copied to clipboard

Logging

Open sergii-zemlianyi opened this issue 6 years ago • 0 comments

Hi all,

I've read here https://github.com/stanfordnlp/CoreNLP/issues/433 how to run CoreNLP server with slf4j logging, so when I start server with java -Dorg.slf4j.simpleLogger.logFile=logfile -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat='yyyy-MM-dd HH:mm:ss:SSS' -Dorg.slf4j.simpleLogger.defaultLogLevel=debug -cp "*" -mx40m edu.stanford.nlp.pipeline.StanfordCoreNLPServer

it indeed writes into logfile but not all we need. For instance we want to catch server related issues, like OOM or read-only FS etc. If I mimic OOM by starting with little memory and passing large amount of text I see the following error in stdout but not in logfile Exception in thread "pool-1-thread-1" java.lang.OutOfMemoryError: GC overhead limit exceeded at java.lang.StringBuilder.toString(StringBuilder.java:407)

What is missing in configuration to have all messages flow into specified logfile?

Thanks ahead, Sergii

sergii-zemlianyi avatar May 01 '19 18:05 sergii-zemlianyi