package com.peachyy.logback;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Objects;

/**
 * <p>描述:</p>
 *
 * @author Tao xs
 * @since 2.0
 * <p>Created by Tao xs on 2017/4/6.</p>
 */
public class Test1 {

    public static Logger log = LoggerFactory.getLogger(Test1.class.getName());

    //ExecutorService executors = Executors.newFixedThreadPool(2000);
    public static void main(String[] args) {
        for (int i = 0; i < 1000; i++) {
            log.debug("测试一下1{}", i);
            log.debug("测试一下2{}", i);
            log.debug("测试一下3{}", i);
            try {
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

    }

    @Test
    public void test2() {
        for (int i = 0; i < 5000; i++) {
            final String a = Objects.toString(i);
            new Thread(new Runnable() {
                @Override
                public void run() {
                    log.debug("测试一下{}", a);
                }
            }).start();
        }
        try {
            Thread.sleep(111111111);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}

@@ -1084,32 +1084,34 @@
 rt();%0A        %7D%0A
+//
         try %7B%0A  
@@ -1100,32 +1100,34 @@
 //        try %7B%0A
+//
             Thre
@@ -1147,16 +1147,18 @@
 11111);%0A
+//
         
@@ -1184,32 +1184,34 @@
 dException e) %7B%0A
+//
             e.pr
@@ -1219,32 +1219,34 @@
 ntStackTrace();%0A
+//
         %7D%0A    %7D%0A

remove sleep