}
private Map<String, Object> loggingGetPhaseMapForWriting(boolean loggingEnabled) {
FacesContext context = FacesContext.getCurrentInstance();
Map<String, Object> result = null;
PhaseId currentPhase = context.getCurrentPhaseId();
Map<Object, Object> contextMap = context.getAttributes();
PreviousNextFlashInfoManager flashManager;
if (null != (flashManager = getCurrentFlashManager(contextMap, true))) {
FlashInfo flashInfo;
boolean isDebugLog = loggingEnabled && LOGGER.isLoggable(Level.FINEST);
if (currentPhase.getOrdinal() < PhaseId.RENDER_RESPONSE.getOrdinal()) {
flashInfo = flashManager.getPreviousRequestFlashInfo();
if (isDebugLog) {
LOGGER.log(Level.FINEST, "{0}previous[{1}]",
new Object[]{getLogPrefix(context),
flashInfo.getSequenceNumber()});