org.apache.servicecomb.foundation.common.utils.Log4jUtils Java Examples

The following examples show how to use org.apache.servicecomb.foundation.common.utils.Log4jUtils. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CodeFirstMain.java    From skywalking with Apache License 2.0 6 votes vote down vote up
public static void init() {
    while (true) {
        try {
            Log4jUtils.init();
            BeanUtils.init();
            return;
        } catch (Throwable e) {
            try {
                LOGGER.error(e.getMessage(), e);
                Thread.sleep(5000);
            } catch (InterruptedException ex) {
                // ignore
            }
        }
    }
}
 
Example #2
Source File: ConsumerMain.java    From servicecomb-java-chassis with Apache License 2.0 6 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();

  new Consumer().testEncrypt();

  System.out.println("Running api dispatcher.");
  new Consumer().run("api");
  System.out.println("Running rest dispatcher.");
  new Consumer().run("rest");
  System.out.println("Running url dispatcher.");
  new Consumer().run("url");
  System.out.println("Running http dispatcher.");
  new Consumer().run("http");

  System.out.println("All test case finished.");
}
 
Example #3
Source File: PojoClient.java    From servicecomb-java-chassis with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();

  try {
    run();
  } catch (Exception e) {
    TestMgr.check("success", "failed");
    LOGGER.error("-------------- test failed -------------");
    LOGGER.error("", e);
    LOGGER.error("-------------- test failed -------------");
  }

  TestMgr.summary();
}
 
Example #4
Source File: AClientMain.java    From servicecomb-java-chassis with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();

  AClient client = BeanUtils.getContext().getBean(AClient.class);
  client.run();

  TestMgr.summary();
}
 
Example #5
Source File: MultipleClient.java    From servicecomb-java-chassis with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();

  AClient aClient = BeanUtils.getContext().getBean(AClient.class);
  BClient bClient = BeanUtils.getContext().getBean(BClient.class);

  aClient.run();
  bClient.run();

  TestMgr.summary();
}
 
Example #6
Source File: BClientMain.java    From servicecomb-java-chassis with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();

  BClient client = BeanUtils.getContext().getBean(BClient.class);
  client.run();

  TestMgr.summary();
}
 
Example #7
Source File: CrossappClient.java    From servicecomb-java-chassis with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
  System.setProperty("sun.net.http.allowRestrictedHeaders", "true");
  Log4jUtils.init();
  BeanUtils.init();

  run();

  TestMgr.summary();
  System.setProperty("sun.net.http.allowRestrictedHeaders", "false");
}
 
Example #8
Source File: DynamicConfigurationIT.java    From servicecomb-java-chassis with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void setUp() throws Exception {
  vertx = Vertx.vertx();
  vertx.deployVerticle(new SimApolloServer());

  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #9
Source File: SpringmvcClient.java    From servicecomb-java-chassis with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
  try {
    Log4jUtils.init();
    BeanUtils.init();

    run();
  } catch (Throwable e) {
    TestMgr.check("success", "failed");
    LOGGER.error("-------------- test failed -------------");
    LOGGER.error("", e);
    LOGGER.error("-------------- test failed -------------");
  }
  TestMgr.summary();
}
 
Example #10
Source File: Server.java    From rpc-benchmark with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
	Object exec = GlobalEventExecutor.INSTANCE;
	System.out.println(exec);

	Log4jUtils.init();
	BeanUtils.init();
}
 
Example #11
Source File: CrossappServer.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #12
Source File: EdgeMain.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #13
Source File: BusinessMain_V1_1_0.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #14
Source File: SpringmvcServer.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #15
Source File: AuthMain.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #16
Source File: BusinessMain_V2_0_0.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #17
Source File: MultipleServer.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #18
Source File: BusinessMain_V1_0_0.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #19
Source File: PojoServer.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #20
Source File: AppMain.java    From spring-cloud-huawei with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
    Log4jUtils.init();
    BeanUtils.init();
}
 
Example #21
Source File: AServerMain.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #22
Source File: BServerMain.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #23
Source File: JaxrsTestMain.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #24
Source File: SpringMvcTestMain.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #25
Source File: SpringMvcTestMain.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #26
Source File: SpringMvcTestMain.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #27
Source File: PojoTestMain.java    From servicecomb-java-chassis with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #28
Source File: EdgeApplication.java    From scaffold with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example #29
Source File: EdgeMain.java    From spring-cloud-huawei with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}