#in a time sensitive loop $logger->setFlushPending(); #later on $logger->flushPending();