10:52:16,587 INFO [stdout] (http--0.0.0.0-8080-3) Hibernate:
10:52:16,587 INFO [stdout] (http--0.0.0.0-8080-3) select
10:52:16,587 INFO [stdout] (http--0.0.0.0-8080-3) agebandage0_.age_band_age_id as age_band4_5_0_,
10:52:16,587 INFO [stdout] (http--0.0.0.0-8080-3) agebandage0_.age_band_age_share_id as age_band1_6_0_,
10:52:16,587 INFO [stdout] (http--0.0.0.0-8080-3) agebandage0_.age_band_age_share_id as age_band1_6_1_,
10:52:16,587 INFO [stdout] (http--0.0.0.0-8080-3) agebandage0_.age_band_age_id as age_band4_6_1_,
10:52:16,588 INFO [stdout] (http--0.0.0.0-8080-3) agebandage0_.is_active as is_activ2_6_1_,
10:52:16,588 INFO [stdout] (http--0.0.0.0-8080-3) agebandage0_.share_amount as share_am3_6_1_,
10:52:16,588 INFO [stdout] (http--0.0.0.0-8080-3) agebandage0_.tier_id as tier_id5_6_1_
10:52:16,588 INFO [stdout] (http--0.0.0.0-8080-3) from
10:52:16,588 INFO [stdout] (http--0.0.0.0-8080-3) eba_age_band_age_share agebandage0_
10:52:16,589 INFO [stdout] (http--0.0.0.0-8080-3) where
10:52:16,589 INFO [stdout] (http--0.0.0.0-8080-3) agebandage0_.age_band_age_id=?
我想以下列方式记录sql查询:
10:52:16,588 INFO [stdout] (http--0.0.0.0-8080-3)
Hibernate:
SELECT
agebandage0_.age_band_age_id AS age_band4_5_0_,
agebandage0_.age_band_age_share_id AS age_band1_6_0_,
agebandage0_.age_band_age_share_id AS age_band1_6_1_,
agebandage0_.age_band_age_id AS age_band4_6_1_,
agebandage0_.is_active AS is_activ2_6_1_,
agebandage0_.share_amount AS share_am3_6_1_,
agebandage0_.tier_id AS tier_id5_6_1_
FROM
eba_age_band_age_share agebandage0_
WHERE
agebandage0_.age_band_age_id=?
答案 0 :(得分:0)
Hibernate查询日志记录写入stdout,System.out
,它由JBoss AS 7中的记录器包装。包装流处理每行分别记录每一行,这就是为什么你在每行看到前缀。< / p>
无法关闭此功能。您可以创建一个名为stdout
的记录器,并为其分配一个不适用于任何格式的处理程序。只需给它一个%s%n
的模式。这将打印每行没有格式化。