Sunday 15 July 2012

log4j - JBoss 7.1 hibernate sql query logging not in new line what should i do? -



log4j - JBoss 7.1 hibernate sql query logging not in new line what should i do? -

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 age_band4_5_0_, 10:52:16,587 info [stdout] (http--0.0.0.0-8080-3) agebandage0_.age_band_age_share_id age_band1_6_0_, 10:52:16,587 info [stdout] (http--0.0.0.0-8080-3) agebandage0_.age_band_age_share_id age_band1_6_1_, 10:52:16,587 info [stdout] (http--0.0.0.0-8080-3) agebandage0_.age_band_age_id age_band4_6_1_, 10:52:16,588 info [stdout] (http--0.0.0.0-8080-3) agebandage0_.is_active is_activ2_6_1_, 10:52:16,588 info [stdout] (http--0.0.0.0-8080-3) agebandage0_.share_amount share_am3_6_1_, 10:52:16,588 info [stdout] (http--0.0.0.0-8080-3) agebandage0_.tier_id tier_id5_6_1_ 10:52:16,588 info [stdout] (http--0.0.0.0-8080-3) 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) 10:52:16,589 info [stdout] (http--0.0.0.0-8080-3) agebandage0_.age_band_age_id=?

i want log sql query in next manner :

10:52:16,588 info [stdout] (http--0.0.0.0-8080-3) hibernate: select agebandage0_.age_band_age_id age_band4_5_0_, agebandage0_.age_band_age_share_id age_band1_6_0_, agebandage0_.age_band_age_share_id age_band1_6_1_, agebandage0_.age_band_age_id age_band4_6_1_, agebandage0_.is_active is_activ2_6_1_, agebandage0_.share_amount share_am3_6_1_, agebandage0_.tier_id tier_id5_6_1_ eba_age_band_age_share agebandage0_ agebandage0_.age_band_age_id=?

hibernate query logging writes stdout, system.out, wrapped logger in jboss 7. wrapped stream processes each line separately logging each line separately why see prefix on each line.

there no way turn off. create logger called stdout , assign handler doesn't formatting. give pattern of %s%n. print each line no formatting.

log4j jboss7.x

No comments:

Post a Comment