怎样可以不输出hibernate日志,急!!(100分)

  • 主题发起人 主题发起人 sunjing_81
  • 开始时间 开始时间
S

sunjing_81

Unregistered / Unconfirmed
GUEST, unregistred user!
我的一个java项目用了hibernate,可是日志暴涨,请问富翁们有没有办法不让hibernate显示类似如下这些信息(我已在log4j里面把级别弄到了error了,可还是不行):
14:34:47,059 INFO [Environment] loaded properties from resource hibernate.properties:
{hibernate.connection.username=root, hibernate.connection.password=mysql,
hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect,
hibernate.show_sql=true, hibernate.connection.url=jdbc:mysql://192.168.20.201:3306/expenseclaims,
hibernate.connection.driver_class=com.mysql.jdbc.Driver}
14:34:47,059 INFO [Environment] using CGLIB reflection optimizer
14:34:47,121 INFO [STDOUT] log4j:WARN No such property [datePattern] in org.apache.log4j.RollingFileAppender.
14:34:47,121 INFO [Configuration] configuring from resource: /hibernate.cfg.xml
14:34:47,121 INFO [Configuration] Configuration resource: /hibernate.cfg.xml
14:34:47,386 INFO [Configuration] Mapping resource: com/kwok/expense/bean/User.hbm.xml
14:34:47,573 INFO [Binder] Mapping class: com.kwok.expense.bean.User -> user
14:34:47,854 INFO [Configuration] Mapping resource: com/kwok/expense/bean/UserRole.hbm.xml
14:34:47,870 INFO [Binder] Mapping class: com.kwok.expense.bean.UserRole -> user_role
14:34:47,885 INFO [Configuration] Mapping resource: com/kwok/expense/bean/UserRight.hbm.xml
14:34:47,916 INFO [Binder] Mapping class: com.kwok.expense.bean.UserRight -> user_right
14:34:47,916 INFO [Configuration] Mapping resource: com/kwok/expense/bean/Application.hbm.xml
14:34:48,010 INFO [Binder] Mapping class: com.kwok.expense.bean.Application -> application
14:34:48,057 INFO [Configuration] Mapping resource: com/kwok/expense/bean/ApplicationItem.hbm.xml
14:34:48,072 INFO [Binder] Mapping class: com.kwok.expense.bean.ApplicationItem -> application_item
14:34:48,072 INFO [Configuration] Mapping resource: com/kwok/expense/bean/AccMapItem.hbm.xml
14:34:48,103 INFO [Binder] Mapping class: com.kwok.expense.bean.AccMapItem -> accmap_item
14:34:48,103 INFO [Configuration] Mapping resource: com/kwok/expense/bean/Histroyinfo.hbm.xml
14:34:48,119 INFO [Binder] Mapping class: com.kwok.expense.bean.Histroyinfo -> histroyinfo
14:34:48,134 INFO [Configuration] Mapping resource: com/kwok/expense/bean/FormId.hbm.xml
14:34:48,166 INFO [Binder] Mapping class: com.kwok.expense.bean.FormId -> formid
14:34:48,166 INFO [Configuration] Mapping resource: com/kwok/expense/bean/ApplicationStatus.hbm.xml
14:34:48,212 INFO [Binder] Mapping class: com.kwok.expense.bean.ApplicationStatus -> application_status
14:34:48,212 INFO [Configuration] Mapping resource: com/kwok/expense/bean/RoleType.hbm.xml
14:34:48,244 INFO [Binder] Mapping class: com.kwok.expense.bean.RoleType -> role_type
14:34:48,244 INFO [Configuration] Mapping resource: com/kwok/expense/bean/Corp_psn.hbm.xml
14:34:48,290 INFO [Binder] Mapping class: com.kwok.expense.bean.Corp_psn -> corp_psn
14:34:48,290 INFO [Configuration] Configured SessionFactory: null
14:34:48,290 INFO [Configuration] processing one-to-many association mappings
14:34:48,290 INFO [Binder] Mapping collection: com.kwok.expense.bean.User.roleList -> user_role
14:34:48,290 INFO [Binder] Mapping collection: com.kwok.expense.bean.User.rightList -> user_right
14:34:48,290 INFO [Binder] Mapping collection: com.kwok.expense.bean.Application.itemList -> application_item
14:34:48,290 INFO [Binder] Mapping collection: com.kwok.expense.bean.ApplicationItem.mapItemList -> accmap_item
14:34:48,306 INFO [Configuration] processing one-to-one association property references
14:34:48,306 INFO [Configuration] processing foreign key constraints
14:34:48,368 INFO [Dialect] Using dialect: net.sf.hibernate.dialect.MySQLDialect
14:34:48,368 INFO [SettingsFactory] Use outer join fetching: false
14:34:48,384 INFO [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.loader.Loader] result row: 04
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.loader.Loader] Initializing object from ResultSet: 04
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.loader.Loader] Hydrating entity: com.kwok.expense.bean.Dept#04
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.type.StringType] returning '??H??§????
' as column: DEPT_NAMEC
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.type.StringType] returning 'IT' as column: DEPT_NAMEE
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.type.StringType] returning '????????????' as column: DEPT_NAMES
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.loader.Loader]do
ne processing result set (1 rows)
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.BatcherImpl]do
ne closing: 0 open PreparedStatements, 0 open ResultSets
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.BatcherImpl] closing statement
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.loader.Loader] total objects hydrated: 1
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.SessionImpl] resolving associations for [com.kwok.expense.bean.Dept#04]
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.SessionImpl]do
ne materializing entity [com.kwok.expense.bean.Dept#04]
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.SessionImpl] initializing non-lazy collections
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.SessionImpl] find: from Dept a where a.deptCode=?
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.engine.QueryParameters] parameters: [04]
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.engine.QueryParameters] named parameters: {}
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.SessionImpl] flushing session
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.SessionImpl] Flushing entities and processing referenced collections
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.SessionImpl] Processing unreferenced collections
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.SessionImpl] Scheduling collection removes/(re)creates/updates
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.SessionImpl] Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.SessionImpl] Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.Printer] listing entities:
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.Printer] com.kwok.expense.bean.Dept{deptNameS=????????????, deptCode=04, deptNameE=IT, deptNameC=??H??§????
}
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.SessionImpl]do
nt need to execute flush
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.hql.QueryTranslator] HQL: from com.kwok.expense.bean.Dept a where a.deptCode=?
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.hql.QueryTranslator] SQL: select dept0_.DEPT_CODE as DEPT_CODE, dept0_.DEPT_NAMEC as DEPT_NAMEC, dept0_.DEPT_NAMEE as DEPT_NAMEE, dept0_.DEPT_NAMES as DEPT_NAMES from deptmas dept0_ where (dept0_.DEPT_CODE=? )
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.SQL] select dept0_.DEPT_CODE as DEPT_CODE, dept0_.DEPT_NAMEC as DEPT_NAMEC, dept0_.DEPT_NAMEE as DEPT_NAMEE, dept0_.DEPT_NAMES as DEPT_NAMES from deptmas dept0_ where (dept0_.DEPT_CODE=? )
2006-06-02 14:35:25,010 DEBUG [net.sf.hibernate.impl.BatcherImpl] preparing statement
2006-06-02 14:35:25,025 DEBUG [net.sf.hibernate.type.StringType] binding '04' to parameter: 1
2006-06-02 14:35:25,025 DEBUG [net.sf.hibernate.loader.Loader] processing result set
2006-06-02 14:35:25,025 DEBUG [net.sf.hibernate.type.StringType] returning '04' as column: DEPT_CODE
2006-06-02 14:35:25,025 DEBUG [net.sf.hibernate.loader.Loader] result row: 04
2006-06-02 14:35:25,025 DEBUG [net.sf.hibernate.loader.Loader]do
ne processing result set (1 rows)
2006-06-02 14:35:25,025 DEBUG [net.sf.hibernate.impl.BatcherImpl]do
ne closing: 0 open PreparedStatements, 0 open ResultSets
2006-06-02 14:35:25,025 DEBUG [net.sf.hibernate.impl.BatcherImpl] closing statement
2006-06-02 14:35:25,025 DEBUG [net.sf.hibernate.loader.Loader] total objects hydrated: 0
2006-06-02 14:35:25,025 DEBUG [net.sf.hibernate.impl.SessionImpl] initializing non-lazy collections
2006-06-02 14:35:25,025 DEBUG [net.sf.hibernate.impl.SessionImpl] closing session
2006-06-02 14:35:25,025 DEBUG [net.sf.hibernate.impl.SessionImpl] disconnecting session
2006-06-02 14:35:25,025 DEBUG [net.sf.hibernate.connection.DriverManagerConnectionProvider] returning connection to pool, pool size: 1
2006-06-02 14:35:25,025 DEBUG [net.sf.hibernate.impl.SessionImpl] transaction completion
2006-06-02 14:35:25,119 DEBUG [net.sf.hibernate.impl.SessionImpl] running Session.finalize()
2006-06-02 14:35:25,119 DEBUG [net.sf.hibernate.impl.SessionImpl] running Session.finalize()
2006-06-02 14:35:25,119 DEBUG [net.sf.hibernate.impl.SessionImpl] running Session.finalize()
2006-06-02 14:35:55,214 DEBUG [net.sf.hibernate.impl.SessionImpl] running Session.finalize()
2006-06-02 14:35:55,214 DEBUG [net.sf.hibernate.impl.SessionImpl] running Session.finalize()
 
后退
顶部