lishunli / nutz

Automatically exported from code.google.com/p/nutz
0 stars 0 forks source link

log: 使用Nutz的log工具在eclipse控制台打印的日志无法通过点击链接后跟踪到调用的代码行 #134

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
log4j.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
    <appender name="system.out" 
class="org.apache.log4j.ConsoleAppender">
        <param name="Target" value="System.out" />
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%l%n[%5p][%
t]- %m%n" />
        </layout>
    </appender>

    <root>
        <level value="all" />
        <appender-ref ref="system.out" />
    </root>
</log4j:configuration>

运行TestAll结果:
org.nutz.log.impl.AbstractLog.debug(AbstractLog.java:16)
[DEBUG][main]- Get 'dao'<interface org.nutz.dao.Dao>
org.nutz.log.impl.AbstractLog.debug(AbstractLog.java:16)
[DEBUG][main]- Get 'metas'<class org.nutz.dao.test.meta.Pojos>
org.nutz.log.impl.AbstractLog.debug(AbstractLog.java:16)
[DEBUG][main]- Get 'dao'<interface org.nutz.dao.Dao>
org.nutz.log.impl.AbstractLog.debug(AbstractLog.java:16)
[DEBUG][main]- Get 'metas'<class org.nutz.dao.test.meta.Pojos>
org.nutz.log.impl.AbstractLog.debug(AbstractLog.java:16)
[DEBUG][main]- DROP TABLE DAO_TOOL_ABC
org.nutz.log.impl.AbstractLog.debug(AbstractLog.java:16)
[DEBUG][main]- CREATE TABLE DAO_TOOL_ABC("id"  INT NOT NULL
,"name"  VARCHAR(20) )
ALTER TABLE DAO_TOOL_ABC WITH NOCHECK ADD CONSTRAINT PK_DAO_TOOL_ABC 
PRIMARY KEY  NONCLUSTERED (id)

org.nutz.log.impl.AbstractLog.debug(AbstractLog.java:16)
[DEBUG][main]- INSERT INTO DAO_TOOL_ABC(id,name) VALUES(99,'ABC')
org.nutz.log.impl.AbstractLog.debug(AbstractLog.java:16)
[DEBUG][main]- SELECT COUNT(*) FROM DAO_TOOL_ABC 
org.nutz.log.impl.AbstractLog.debug(AbstractLog.java:16)
[DEBUG][main]- SELECT MAX(id) FROM DAO_TOOL_ABC 

Original issue reported on code.google.com by jiongs...@gmail.com on 13 Mar 2010 at 1:44

GoogleCodeExporter commented 9 years ago
debug总是定位到AbstractLog.java:16
其他同理

Original comment by jiongs...@gmail.com on 13 Mar 2010 at 1:44

GoogleCodeExporter commented 9 years ago

Original comment by wendal1985@gmail.com on 13 Mar 2010 at 3:05

GoogleCodeExporter commented 9 years ago
@Wendal 实验了你最新的修改,好像没问题了

Original comment by zozoh...@gmail.com on 13 Mar 2010 at 7:56

GoogleCodeExporter commented 9 years ago
Fix in 1.a.27
fix in r938

Original comment by wendal1985@gmail.com on 13 Mar 2010 at 7:59

GoogleCodeExporter commented 9 years ago
@zozohtnt
不过我觉得改的比较丑

Original comment by wendal1985@gmail.com on 13 Mar 2010 at 8:00

GoogleCodeExporter commented 9 years ago
没关系,能工作就成
以后有时间我们再慢慢重构,先 Fix 吧

Original comment by zozoh...@gmail.com on 13 Mar 2010 at 8:14

GoogleCodeExporter commented 9 years ago

Original comment by wendal1985@gmail.com on 15 Mar 2010 at 5:06

GoogleCodeExporter commented 9 years ago

Original comment by jiongs...@gmail.com on 16 Mar 2010 at 2:13

GoogleCodeExporter commented 9 years ago

Original comment by wendal1985@gmail.com on 13 May 2010 at 11:06