// Path: step5_custom-soap-fault/src/main/java/de/jonashackt/tutorial/common/FaultConst.java
// public enum FaultConst {
// 
// 	SUCCESSFULL_PROCESSING("01", "The Weather-Call was successfully processed by the backend."),
// 	SCHEME_VALIDATION_ERROR("07", "XML-Scheme-validiation failed."),
// 	SYNTACTICALLY_INCORRECT_XML_ERROR("08", "Syntactically incorrect XML."),	
// 	BACKEND_PROCESSING_FAILED("04", "Backend processing failed.");
// 
// 	private String id;
// 	private String message;
// 	
// 	private FaultConst(String id, String text) {
// 		this.id = id;
// 		this.message = text;
// 	}
// 	
// 	public String getMessage() {
// 		return message;
// 	}
// 	
// 	public String getId() {
// 		return id;
// 	}
// 	
// }


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import de.jonashackt.tutorial.common.FaultConst;
package de.jonashackt.tutorial.logging;



public class SoapFrameworkLogger {
    
	private Logger delegateLogger;
	
	private SoapFrameworkLogger() {};
	
	public static <L> SoapFrameworkLogger getLogger(Class<L> class2LogFor) {
		SoapFrameworkLogger frameworkLogger = new SoapFrameworkLogger();
		frameworkLogger.delegateLogger = LoggerFactory.getLogger(class2LogFor);
		return frameworkLogger;
	}	
	
	/*
	 * Errors - 9xx
	 */
	public void errorAccuredInBackendProcessing(Throwable cause) {
		logError("901", "An Error accured in backend-processing: {}", cause.getMessage());
	}
	
	public void failedToBuildWeatherServiceCompliantSoapFaultDetails(Throwable cause) {
		logError("902", "Failed to build Weather-compliant SoapFault-details: {}\nStacktrace: {}", cause.getMessage(), cause.getStackTrace());
	}	
	
// Path: step5_custom-soap-fault/src/main/java/de/jonashackt/tutorial/common/FaultConst.java
// public enum FaultConst {
// 
// 	SUCCESSFULL_PROCESSING("01", "The Weather-Call was successfully processed by the backend."),
// 	SCHEME_VALIDATION_ERROR("07", "XML-Scheme-validiation failed."),
// 	SYNTACTICALLY_INCORRECT_XML_ERROR("08", "Syntactically incorrect XML."),	
// 	BACKEND_PROCESSING_FAILED("04", "Backend processing failed.");
// 
// 	private String id;
// 	private String message;
// 	
// 	private FaultConst(String id, String text) {
// 		this.id = id;
// 		this.message = text;
// 	}
// 	
// 	public String getMessage() {
// 		return message;
// 	}
// 	
// 	public String getId() {
// 		return id;
// 	}
// 	
// }


// Path: step5_custom-soap-fault/src/main/java/de/jonashackt/tutorial/logging/SoapFrameworkLogger.java
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import de.jonashackt.tutorial.common.FaultConst;

package de.jonashackt.tutorial.logging;



public class SoapFrameworkLogger {
    
	private Logger delegateLogger;
	
	private SoapFrameworkLogger() {};
	
	public static <L> SoapFrameworkLogger getLogger(Class<L> class2LogFor) {
		SoapFrameworkLogger frameworkLogger = new SoapFrameworkLogger();
		frameworkLogger.delegateLogger = LoggerFactory.getLogger(class2LogFor);
		return frameworkLogger;
	}	
	
	/*
	 * Errors - 9xx
	 */
	public void errorAccuredInBackendProcessing(Throwable cause) {
		logError("901", "An Error accured in backend-processing: {}", cause.getMessage());
	}
	
	public void failedToBuildWeatherServiceCompliantSoapFaultDetails(Throwable cause) {
		logError("902", "Failed to build Weather-compliant SoapFault-details: {}\nStacktrace: {}", cause.getMessage(), cause.getStackTrace());
	}	
	
	public void schemaValidationError(FaultConst error, String faultMessage) {