package com.a.eye.skywalking.api.conf;

import com.a.eye.skywalking.api.logging.LogLevel;

public class Config {

    public static class Agent {
        public static String APPLICATION_CODE = "";

        public static int SAMPLING_CYCLE = 1;
    }

    public static class Collector {
        public static String SERVERS = "";

        public static String SERVICE_NAME = "/segments";

        public static int BATCH_SIZE = 50;
    }

    public static class Buffer {
        public static int SIZE = 512;
    }

    public static class Logging {
        // log文件名
        public static String FILE_NAME = "skywalking-api.log";
        // log文件文件夹名字
        public static String DIR = "";
        // 最大文件大小
        public static int MAX_FILE_SIZE = 300 * 1024 * 1024;

        public static LogLevel LEVEL = LogLevel.DEBUG;
    }
}

@@ -87,390 +87,1458 @@
 el;%0A
-%0Apublic class Config %7B%0A%0A    public static class Agent %7B%0A        public static String APPLICATION_CODE = %22%22;%0A%0A        public static int SAMPLING_CYCLE = 1;%0A    %7D%0A%0A    public static class Collector %7B%0A        public static String SERVERS = %22%22;%0A%0A        public static String SERVICE_NAME = %22/segments%22;%0A%0A        public static int BATCH_SIZE = 50;%0A    %7D%0A%0A    public static class Buffer %7B
+import com.a.eye.skywalking.api.logging.WriterFactory;%0A%0A/**%0A * This is the core config in sniffer agent.%0A *%0A * @author wusheng%0A */%0Apublic class Config %7B%0A%0A    public static class Agent %7B%0A        /**%0A         * Application code is showed in sky-walking-ui.%0A         * Suggestion: set a unique name for each application, one application's nodes share the same code.%0A         */%0A        public static String APPLICATION_CODE = %22%22;%0A%0A        /**%0A         * One, means sampling OFF.%0A         * Greater than one, select one trace in every N traces.%0A         * Zero and negative number are illegal.%0A         */%0A        public static int SAMPLING_CYCLE = 1;%0A    %7D%0A%0A    public static class Collector %7B%0A        /**%0A         * Collector REST-Service address.%0A         * e.g.%0A         * SERVERS=%22127.0.0.1:8080%22  for single collector node.%0A         * SERVERS=%2210.2.45.126:8080,10.2.45.127:7600%22  for multi collector nodes.%0A         */%0A        public static String SERVERS = %22%22;%0A%0A        /**%0A         * Collector receive segments REST-Service name.%0A         */%0A        public static String SERVICE_NAME = %22/segments%22;%0A%0A        /**%0A         * The max size to send traces per rest-service call.%0A         */%0A        public static int BATCH_SIZE = 50;%0A    %7D%0A%0A    public static class Buffer %7B%0A        /**%0A         * The in-memory buffer size. Based on Disruptor, this value must be 2%5En.%0A         *%0A         * @see %7Bhttps://github.com/LMAX-Exchange/disruptor%7D%0A         */
 %0A   
@@ -1626,16 +1626,48 @@
    /
-/ log%E6%96%87%E4%BB%B6%E5%90%8D
+**%0A         * Log file name.%0A         */
 %0A   
@@ -1726,16 +1726,17 @@
 i.log%22;%0A
+%0A
         
@@ -1740,20 +1740,194 @@
    /
-/ log%E6%96%87%E4%BB%B6%E6%96%87%E4%BB%B6%E5%A4%B9%E5%90%8D%E5%AD%97
+**%0A         * Log files directory.%0A         * Default is blank string, means, use %22system.out%22 to output logs.%0A         *%0A         * @see %7B@link WriterFactory#getLogWriter()%7D%0A         */
 %0A   
@@ -1962,16 +1962,17 @@
 R = %22%22;%0A
+%0A
         
@@ -1976,78 +1976,330 @@
    /
-/ %E6%9C%80%E5%A4%A7%E6%96%87%E4%BB%B6%E5%A4%A7%E5%B0%8F%0A        public static int MAX_FILE_SIZE = 300 * 1024 * 1024;%0A
+**%0A         * The max size of log file.%0A         * If the size is bigger than this, archive the current file, and write into a new file.%0A         */%0A        public static int MAX_FILE_SIZE = 300 * 1024 * 1024;%0A%0A        /**%0A         * The log level. Default is debug.%0A         *%0A         * @see %7B@link LogLevel%7D%0A         */
 %0A   

Add comments for sniffer Config.