org.apache.catalina.startup.Embedded.setLogger()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中org.apache.catalina.startup.Embedded.setLogger()方法的一些代码示例,展示了Embedded.setLogger()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Embedded.setLogger()方法的具体详情如下:
包路径:org.apache.catalina.startup.Embedded
类名称:Embedded
方法名:setLogger

Embedded.setLogger介绍

[英]Set the Logger for this component.
[中]设置此组件的记录器。

代码示例

代码示例来源:origin: org.glassfish.web/web-glue

public void onInitialization(String rootDir, String instanceName,
               boolean useNaming, Logger logger,
               String embeddedClassName) 
  throws Exception {
  Class c = Class.forName(embeddedClassName);
  _embedded = (Embedded) c.newInstance();
  _embedded.setUseNaming(useNaming);
  _embedded.setLogger(logger);
  _engine = _embedded.createEngine();
  _embedded.addEngine(_engine);
}

代码示例来源:origin: org.glassfish.main.web/web-core

/**
 * Construct a new instance of this class with specified properties.
 *
 * @param logger Logger implementation to be inherited by all components
 *  (unless overridden further down the container hierarchy)
 * @param realm Realm implementation to be inherited by all components
 *  (unless overridden further down the container hierarchy)
 */
public Embedded(org.apache.catalina.Logger logger, Realm realm) {
  super();
  setLogger(logger);
  setRealm(realm);
  setSecurityProtection();
  
}

相关文章