package com.eactive.eai.adapter.socket2.common;

import com.eactive.eai.common.util.SMSLogUtil;
import com.eactive.eai.common.util.StringUtil;

public class SMSLogger {
	private SMSLogger() {
		
	}
	public static void loggingSMS(String svcName, String logMsg) {
		if(Env.isSmsEnabled()) {
			SMSLogUtil.loggingSMS(svcName, logMsg);
		}
	}

	public static void loggingSMSWithCode(String svcName, String code) {
		if(Env.isSmsEnabled()) {
			SMSLogUtil.loggingSMSWithCode(svcName, code);
		}
	}
	
	public static void loggingSMS4Soc(String adptName, String adptDesc, String code) {
		if(Env.isSmsEnabled()) {
			String svcName = StringUtil.chunkString(adptDesc, 12) + "|" + adptName;
			SMSLogUtil.loggingSMSWithCode(svcName, code);
		}
	}
}
