本文整理了Java中org.seasar.framework.log.Logger.error()
方法的一些代码示例,展示了Logger.error()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.error()
方法的具体详情如下:
包路径:org.seasar.framework.log.Logger
类名称:Logger
方法名:error
[英]ERROR情報を出力します。
[中]错误情報を出力します。
代码示例来源:origin: org.seasar.buri/s2-buri
protected void compileProcessError(String src,Object baseObj,Location location,String message) {
logger.error(location);
logger.error(message);
logger.error(src);
}
代码示例来源:origin: net.arnx/jsonic
@Override
public void error(String message, Throwable e) {
if (e != null) {
log.error(message, e);
} else {
log.error(message);
}
}
}
代码示例来源:origin: org.seasar.container/s2-framework
/**
* ログを出力します。
*
* @param throwable
*/
public final void log(Throwable throwable) {
error(throwable.getMessage(), throwable);
}
代码示例来源:origin: com.github.ns2j/nos2jdbc-util
/**
* ログを出力します。
*
* @param throwable
*/
public final void log(Throwable throwable) {
error(throwable.getMessage(), throwable);
}
代码示例来源:origin: org.seasar.chronos/s2chronos-core
/**
* Futureオブジェクトを待機します.
*
* @param future
* Future
*/
private void waitFuture(Future<?> future) {
if (!async) {
try {
future.get();
} catch (InterruptedException e) {
} catch (ExecutionException e) {
log.error("実行例外が発生しました", e);
}
}
}
代码示例来源:origin: org.seasar.teeda/teeda-core
public static Integer coerceToInteger(Object index, Logger logger) {
try {
return Coercions.coerceToInteger(index, logger);
} catch (ELException e) {
logger_.error(e + " occured at " + CoercionsUtil.class);
return null;
}
}
代码示例来源:origin: org.seasar.jms/s2jms-core
@Override
protected synchronized void eval(final StringWriter out) throws Exception {
boolean succeeded = velocityEngine.evaluate(context, out, "", templateText);
if (!succeeded) {
logger.error("Failed to evaluate velocity template text: " + templateText);
}
}
代码示例来源:origin: org.seasar.tuigwaa/tuigwaa-core
public DirectoryServiceImpl(Hashtable environment, Properties props){
this.environment = environment;
this.props = props;
try{
initialize();
}catch(NamingException ne){
log.error("startup failed, check config/directory.dicon.");
throw new RuntimeException(ne);
}
}
代码示例来源:origin: org.seasar.cms.ymir/ymir
void destroyListeners() {
if (lifecycleListeners_ != null) {
for (int i = 0; i < lifecycleListeners_.length; i++) {
try {
lifecycleListeners_[i].destroy();
} catch (Throwable t) {
logger_.error("Can't destroy lifecycleListener: "
+ lifecycleListeners_[i], t);
}
}
lifecycleListeners_ = null;
}
}
代码示例来源:origin: org.seasar.buri/s2-buri
private static Workbook getWorkbook(InputStream is) {
Workbook workbook = null;
try {
workbook = Workbook.getWorkbook(is);
} catch (BiffException e) {
logger.error(e);
} catch (IOException e) {
throw new IORuntimeException(e);
}
return workbook;
}
代码示例来源:origin: org.seasar.portlet/s2-portlet
public void destroy() {
try {
getGenericPortlet().destroy();
} catch (PortletException e) {
logger.error(e);
}
// do not destroy S2Container because S2Container is shared.
// SingletonS2ContainerFactory.destroy();
}
代码示例来源:origin: org.seasar.tuigwaa/tuigwaa-core
public TgwUser getUser(String userdn){
TgwUser user = null;
try{
ctx = new InitialDirContext(environment);
Attributes attrs = ctx.getAttributes(DirectoryUtils.getRDN(userdn,searchBase));
user = createUser(userdn,attrs);
// ctx.close();
}catch(NamingException ne){
log.error(ne.getMessage());
// ne.printStackTrace();
}finally{
DirectoryUtils.closeQuietly(ctx);
}
return user;
}
代码示例来源:origin: org.seasar.container/s2-framework
public Object invoke(MethodInvocation invocation) throws Throwable {
Class targetClass = getTargetClass(invocation);
if (logger.isDebugEnabled()) {
String methodName = invocation.getMethod().getName();
logger.debug("[ToStringInterceptor] modifying "
+ targetClass.getName() + "#" + methodName);
}
try {
return toString(targetClass, invocation.getThis());
} catch (Exception e) {
logger.error("[ToStringInterceptor] modify failed", e);
return invocation.proceed();
}
}
代码示例来源:origin: org.seasar.tuigwaa/tuigwaa-core
public TgwRole getRole(String roledn){
TgwRole role = null;
try{
ctx = new InitialDirContext(environment);
Attributes attrs = ctx.getAttributes(DirectoryUtils.getRDN(roledn,searchBase));
role = createRole(roledn,attrs);
// ctx.close();
}catch(NamingException ne){
log.error(ne.getMessage());
// ne.printStackTrace();
}finally{
DirectoryUtils.closeQuietly(ctx);
}
return role;
}
代码示例来源:origin: org.seasar.struts/s2-struts
protected void initChain() throws ServletException {
// Parse the configuration file specified by path or resource
try {
String value;
value = getServletConfig().getInitParameter("chainConfig");
if (value != null) {
chainConfig = value;
}
ConfigParser parser = new ConfigParser();
List urls = splitAndResolvePaths(chainConfig);
URL resource;
for (Iterator i = urls.iterator(); i.hasNext();) {
resource = (URL) i.next();
log.info("Loading chain catalog from " + resource);
parser.parse(resource);
}
} catch (Exception e) {
log.error("Exception loading resources", e);
throw new ServletException(e);
}
}
代码示例来源:origin: org.seasar.buri/s2-buri
protected void processException(OgnlException e,String message,Object[] objs,Object expression,Object root,Map context) {
String errInfo = ((e.getReason()!=null) ? "exception=" + e.getReason().toString() : "") + "\nexpression=" + expression + "\ncontext=" + context;
logger.error(errInfo);
if(e.getReason() instanceof RuntimeException) {
throw (RuntimeException)e.getReason();
}
throw new BuriOGNLRuntimeException(message,objs,e);
}
代码示例来源:origin: org.seasar.struts/s2-struts
/**
* <p>
* Simplifies exception handling in the parseModuleConfigFile method.
* <p>
*
* @param path
* The path to which the exception relates.
* @param e
* The exception to be wrapped and thrown.
* @throws UnavailableException
* as a wrapper around Exception
*/
private void handleConfigException(String path, Exception e) throws UnavailableException {
String msg = getActionServlet().getInternal().getMessage("configParse", path);
log.error(msg, e);
throw new UnavailableException(msg);
}
代码示例来源:origin: org.seasar.struts/s2-struts
/**
* <p>
* Handle errors related to creating an instance of the specified class.
* </p>
*
* @param className
* The className that could not be instantiated.
* @param e
* The exception that was caught.
* @throws ServletException
* to communicate the error.
*/
private void handleCreationException(String className, Exception e) throws ServletException {
String errorMessage = getActionServlet().getInternal().getMessage("configExtends.creation", className);
log.error(errorMessage, e);
throw new UnavailableException(errorMessage);
}
代码示例来源:origin: org.seasar.struts/s2-struts
/**
* <p>
* General handling for exceptions caught while inheriting config
* information.
* </p>
*
* @param configType
* The type of configuration object of configName.
* @param configName
* The name of the config that could not be extended.
* @param e
* The exception that was caught.
* @throws ServletException
* to communicate the error.
*/
private void handleGeneralExtensionException(String configType, String configName, Exception e)
throws ServletException {
String errorMessage = getActionServlet().getInternal().getMessage("configExtends", configType, configName);
log.error(errorMessage, e);
throw new UnavailableException(errorMessage);
}
代码示例来源:origin: org.seasar.tuigwaa/tuigwaa-core
private void updateRoles(TgwUser user, String[] roles, int mod_op) throws NamingException{
if(roles != null){
Attributes member = null;
if(prefixOnly){
member = new BasicAttributes(roleUserAttribute,user.getName());
}else{
member = new BasicAttributes(roleUserAttribute,user.getDn());
}
for(int i=0;i<roles.length;i++){
if(roles[i] != null){ // in-case modifying admin user contains admin role, see modifyUser
String roledn = DirectoryUtils.getAbsoluteDN(roles[i],rolePrefix,roleSuffix,searchBase);
try{
ctx.modifyAttributes(DirectoryUtils.getRDN(roledn,searchBase),mod_op,member);
}catch(NamingException ne){
log.error("update failed for " + roledn);
continue;
}
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!