docs: private void logState(final FileRollEvent fileRollEvent) {
  
  //		if (ApplicationState.isApplicationStateEnabled()) {
  			
  			synchronized (this) {
  				
  				final Collection<ApplicationState.ApplicationStateMessage> entries = ApplicationState.getAppStateEntries();
  				for (ApplicationState.ApplicationStateMessage entry : entries) {
                      Level level = ApplicationState.getLog4jLevel(entry.getLevel());
  				    if(level.isGreaterOrEqual(ApplicationState.LOGGER.getEffectiveLevel())) {
  						final org.apache.log4j.spi.LoggingEvent loggingEvent = new org.apache.log4j.spi.LoggingEvent(ApplicationState.FQCN, ApplicationState.LOGGER, level, entry.getMessage(), null);
  
  						//Save the current layout before changing it to the original (relevant for marker cases when the layout was changed)
  						Layout current=fileRollEvent.getSource().getLayout();
  						//fileRollEvent.getSource().activeOriginalLayout();
  						String flowContext = (String) MDC.get("flowCtxt");
  						MDC.remove("flowCtxt");
  						//Write applicationState:
  						if(fileRollEvent.getSource().isAddApplicationState() && fileRollEvent.getSource().getFile().endsWith("log")){
  							fileRollEvent.dispatchToAppender(loggingEvent);
  						}
  						//Set current again.
  						fileRollEvent.getSource().setLayout(current);
  						if (flowContext != null) {
  							MDC.put("flowCtxt", flowContext);
  						}
  						
  					}
  				}
  				
  			}
  			
  //		}
  	}