diff --git a/slb-agent/src/main/java/com/dianping/platform/slb/agent/core/task/LogFormatter.java b/slb-agent/src/main/java/com/dianping/platform/slb/agent/core/task/LogFormatter.java new file mode 100644 index 0000000..37140ab --- /dev/null +++ b/slb-agent/src/main/java/com/dianping/platform/slb/agent/core/task/LogFormatter.java @@ -0,0 +1,56 @@ +package com.dianping.platform.slb.agent.core.task; + +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.Map; + +/** + * dianping.com @2015 + * slb - soft load balance + *
+ * Created by leon.li(Li Yang) + */ +@Service +public class LogFormatter { + + public static final String NEW_LINE = "\r\n"; + + public static final String CHUNK_TERMINATOR = "\r\n--9ed2b78c112fbd17a8511812c554da62941629a8--\r\n"; + + public static final String LOG_TERMINATOR = "\r\n--255220d51dc7fb4aacddadedfe252a346da267d4--\r\n"; + + public void writeHeader(OutputStream logOut, Map