package com.cpp.web.utils;

import com.cpp.web.domain.enums.AlarmEnum;
import com.cpp.web.domain.enums.DataSourcesEnum;
import com.cpp.web.service.alarm.AlarmLog;

/**
 * 信息拼装工具类
 *
 * @Author: tl
 * @Date: 2023/8/1 15:30
 */
public class LogUtil {

    public static String format(String message, Object... args) {
        for (Object arg : args) {
            message = message.replaceFirst("\\{\\}", arg.toString());
        }
        return message;
    }

    public static void info(DataSourcesEnum dataSources, AlarmEnum alarmEnum, String info, String stationCode) {
        AlarmLog.getInstance().info(dataSources, alarmEnum, info, stationCode);
    }

}
