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

The following examples show how to use org.apache.servicecomb.foundation.common.utils.Log4jUtils. These examples are extracted from open source projects. 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 Project: servicecomb-java-chassis   Source File: ConsumerMain.java    License: 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 2
Source Project: skywalking   Source File: CodeFirstMain.java    License: 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 3
@BeforeClass
public static void setUp() throws Exception {
  vertx = Vertx.vertx();
  vertx.deployVerticle(new SimApolloServer());

  Log4jUtils.init();
  BeanUtils.init();
}
 
Example 4
Source Project: servicecomb-java-chassis   Source File: BClientMain.java    License: 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 5
Source Project: servicecomb-java-chassis   Source File: MultipleClient.java    License: 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 Project: servicecomb-java-chassis   Source File: AClientMain.java    License: 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 7
Source Project: servicecomb-java-chassis   Source File: PojoClient.java    License: 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 8
Source Project: servicecomb-java-chassis   Source File: CrossappClient.java    License: 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 9
Source Project: servicecomb-java-chassis   Source File: SpringmvcClient.java    License: 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 Project: rpc-benchmark   Source File: Server.java    License: 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 Project: spring-cloud-huawei   Source File: AppMain.java    License: 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 Project: spring-cloud-huawei   Source File: EdgeMain.java    License: 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 Project: scaffold   Source File: EdgeApplication.java    License: 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 Project: servicecomb-java-chassis   Source File: PojoTestMain.java    License: Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example 15
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example 16
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example 17
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example 18
Source Project: servicecomb-java-chassis   Source File: JaxrsTestMain.java    License: 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 Project: servicecomb-java-chassis   Source File: BServerMain.java    License: 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 Project: servicecomb-java-chassis   Source File: AServerMain.java    License: 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 Project: servicecomb-java-chassis   Source File: MultipleServer.java    License: 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 Project: servicecomb-java-chassis   Source File: PojoServer.java    License: Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example 23
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example 24
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example 25
Source Project: servicecomb-java-chassis   Source File: AuthMain.java    License: Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example 26
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}
 
Example 27
Source Project: servicecomb-java-chassis   Source File: EdgeMain.java    License: 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 Project: servicecomb-java-chassis   Source File: CrossappServer.java    License: 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 Project: servicecomb-java-chassis   Source File: SpringmvcServer.java    License: Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) throws Exception {
  Log4jUtils.init();
  BeanUtils.init();
}