惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
量子位
Recent Announcements
Recent Announcements
T
The Blog of Author Tim Ferriss
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
V
Visual Studio Blog
博客园 - 聂微东
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
U
Unit 42
J
Java Code Geeks
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
L
LangChain Blog

博客园 - 页面载入出错

Grails指南摘要-403-生命周期 Grails指南摘要-401-Controller中设置默认Action Grails指南摘要-307-测试领域类 Grails指南摘要-306-嵌入式对象 Grails指南摘要-305-扩展和继承 Grails指南摘要-304-对象关系 Grails指南摘要-303-自定义对象映射 Grails指南摘要-302-瞬时属性 Grails指南摘要-301-属性验证 20130527-jQuery in actin-看代码说事-ch01 20130518-Grails In Action-5、控制应用程序流(04小节) 20130518-Grails In Action-5、控制应用程序流(03小节) 20130517-Grails In Action-5、控制应用程序流(02小节) 20130517-Grails In Action-5、控制应用程序流(01小节) 20130517-Grails In Action-4、让模型工作(06小节) 20130516-Grails In Action-4、让模型工作(05小节) 20130516-Grails In Action-4、让模型工作(04小节) 20130516-Grails In Action-4、让模型工作(03小节) 20130516-Grails In Action-4、让模型工作(02小节)
Grails指南摘要-402-logging
页面载入出错 · 2013-06-04 · via 博客园 - 页面载入出错

日志接口

public interface Log {
public void debug(Object msg);
public void debug(Object msg, Throwable t);
public void error(Object msg);
public void error(Object msg, Throwable t);
public void fatal(Object msg);
public void fatal(Object msg, Throwable t);
public void info(Object msg);
public void info(Object msg, Throwable t);
public void trace(Object msg);
public void trace(Object msg, Throwable t);
public void warn(Object msg);
public void warn(Object msg, Throwable t);
public boolean isDebugEnabled();
public boolean isErrorEnabled();
public boolean isFatalEnabled();
public boolean isInfoEnabled();
public boolean isTraceEnabled();
public boolean isWarnEnabled();
}

使用日志消息

class SampleController {
  def index() {
    log.info('In the index action...')
    // ...
  }
}

使用错误日志

class SampleController {
  def index() {
    try {
      // do something that might throw an exception
    } catch (Exception e) {
      log.error ('some message goes here', e)
    }
  }
}