Hi all, I am using log4j n my struts-hibernate application. Problem is it logging all the things n struts and hibernate. How I can exclude all the other logging. And its should display only my logging which I specify in my action classes and all other classes which I code. Eg: log.info("inside action class"); which specify in the code should be logged all the other from jar packages logs should be excluded. How it can be done.
My Log4j.propeties file: ---------------------- # Configure logging for testing log4j.rootLogger=DEBUG, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n ------------- EG: I want exclude all the things. I have given eg, below ------------------------------------------- Jun 13, 2006 2:14:49 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [SCMSConfiguration.xml] Jun 13, 2006 2:14:49 PM org.springframework.context.support.AbstractRefreshableApplicationContex t refreshBeanFactory INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext;hash Code=8814509]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [profiledao,bindao,portfoliodao,keyprofiledao,profileDataSource,SessionF actory,exampleHibernateProperties]; root of BeanFactory hierarchy Jun 13, 2006 2:14:49 PM org.springframework.context.support.AbstractApplicationContext refresh INFO: 7 beans defined in application context [org.springframework.context.support.ClassPathXmlApplicationContext;hash Code=8814509] Jun 13, 2006 2:14:49 PM org.springframework.context.support.AbstractApplicationContext initMessageSource INFO: Unable to locate MessageSource with name 'messageSource': using default [EMAIL PROTECTED] Jun 13, 2006 2:14:49 PM org.springframework.context.support.AbstractApplicationContext initApplicationEventMulticaster INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [EMAIL PROTECTED] 6982] Jun 13, 2006 2:14:49 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [profiledao,bindao,portfoliodao,keyprofiledao,profileDataSource,SessionF actory,exampleHibernateProperties]; root of BeanFactory hierarchy] Jun 13, 2006 2:14:49 PM org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName INFO: Loaded JDBC driver: com.mysql.jdbc.Driver Jun 13, 2006 2:14:49 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues INFO: Mapping class: com.fss.dps.persistence.CardProfile -> CardProfile Jun 13, 2006 2:14:49 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues INFO: Mapping class: com.fss.dps.persistence.BinBean -> BIN Jun 13, 2006 2:14:49 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues INFO: Mapping class: com.fss.dps.persistence.ProductPortfolio -> ProductPortfolio Jun 13, 2006 2:14:49 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues INFO: Mapping class: com.fss.dps.forms.KeyprofileForm -> keystore Jun 13, 2006 2:14:49 PM org.springframework.orm.hibernate3.LocalSessionFactoryBean afterPropertiesSet INFO: Building new Hibernate SessionFactory Jun 13, 2006 2:14:49 PM org.hibernate.cfg.Configuration secondPassCompile INFO: processing extends queue Jun 13, 2006 2:14:49 PM org.hibernate.cfg.Configuration secondPassCompile INFO: processing collection mappings Jun 13, 2006 2:14:49 PM org.hibernate.cfg.Configuration secondPassCompile INFO: processing association property references Jun 13, 2006 2:14:49 PM org.hibernate.cfg.Configuration secondPassCompile INFO: processing foreign key constraints Jun 13, 2006 2:14:49 PM org.hibernate.connection.ConnectionProviderFactory newConnectionProvider INFO: Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: RDBMS: MySQL, version: 5.0.16 Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.11 ( $Date: 2005-09-21 18:20:03 +0000 (Wed, 21 Sep 2005) $, $Revision: 4287 $ ) Jun 13, 2006 2:14:49 PM org.hibernate.dialect.Dialect <init> INFO: Using dialect: org.hibernate.dialect.MySQLDialect Jun 13, 2006 2:14:49 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory INFO: Using default transaction strategy (direct JDBC transactions) Jun 13, 2006 2:14:49 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Automatic flush during beforeCompletion(): disabled Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Automatic session close at end of transaction: disabled Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC batch size: 15 Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC batch updates for versioned data: disabled Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Scrollable result sets: enabled Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC3 getGeneratedKeys(): enabled Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Connection release mode: on_close Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Maximum outer join fetch depth: 2 Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Default batch fetch size: 1 Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Generate SQL with comments: disabled Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Order SQL updates by primary key: disabled Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory Jun 13, 2006 2:14:49 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init> INFO: Using ASTQueryTranslatorFactory Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Query language substitutions: {} Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Second-level cache: enabled Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Query cache: disabled Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory createCacheProvider INFO: Cache provider: org.hibernate.cache.EhCacheProvider Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Optimize cache for minimal puts: disabled Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Structured second-level cache entries: disabled Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Statistics: disabled Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Deleted entity synthetic identifier rollback: disabled Jun 13, 2006 2:14:49 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Default entity-mode: pojo Jun 13, 2006 2:14:49 PM org.hibernate.impl.SessionFactoryImpl <init> INFO: building session factory Jun 13, 2006 2:14:49 PM org.hibernate.impl.SessionFactoryObjectFactory addInstance INFO: Not binding factory to JNDI, no JNDI name configured Jun 13, 2006 2:14:49 PM org.hibernate.dialect.Dialect <init> INFO: Using dialect: org.hibernate.dialect.MySQLDialect Jun 13, 2006 2:14:49 PM org.hibernate.connection.ConnectionProviderFactory newConnectionProvider INFO: Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: Running hbm2ddl schema update Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: fetching database metadata Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: updating schema Jun 13, 2006 2:14:49 PM org.hibernate.cfg.Configuration secondPassCompile INFO: processing extends queue Jun 13, 2006 2:14:49 PM org.hibernate.cfg.Configuration secondPassCompile INFO: processing collection mappings Jun 13, 2006 2:14:49 PM org.hibernate.cfg.Configuration secondPassCompile INFO: processing association property references Jun 13, 2006 2:14:49 PM org.hibernate.cfg.Configuration secondPassCompile INFO: processing foreign key constraints Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: table found: dps.bin Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: columns: [platform, bin_no, platform_version, application_version, certifying_authority, application, issuername] Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: foreign keys: [] Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: indexes: [primary] Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: table found: dps.cardprofile Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: foreign keys: [] Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: indexes: [primary] Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: table found: dps.productportfolio Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: columns: [risk_id, description, profile_id, portfolio_id, bin_id, id] Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: foreign keys: [] Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: indexes: [primary] Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: table found: dps.keystore Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: foreign keys: [] Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: indexes: [primary] Jun 13, 2006 2:14:49 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: schema update complete Jun 13, 2006 2:14:49 PM org.hibernate.impl.SessionFactoryImpl checkNamedQueries INFO: Checking 0 named queries binList@@@@@@@@@@@[EMAIL PROTECTED] formList:[EMAIL PROTECTED] inside action formHEX Jun 13, 2006 2:15:04 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [SCMSConfiguration.xml] Jun 13, 2006 2:15:04 PM org.springframework.context.support.AbstractRefreshableApplicationContex t refreshBeanFactory INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext;hash Code=18229916]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [profiledao,bindao,portfoliodao,keyprofiledao,profileDataSource,SessionF actory,exampleHibernateProperties]; root of BeanFactory hierarchy Jun 13, 2006 2:15:04 PM org.springframework.context.support.AbstractApplicationContext refresh INFO: 7 beans defined in application context [org.springframework.context.support.ClassPathXmlApplicationContext;hash Code=18229916] Jun 13, 2006 2:15:04 PM org.springframework.context.support.AbstractApplicationContext initMessageSource INFO: Unable to locate MessageSource with name 'messageSource': using default [EMAIL PROTECTED] Jun 13, 2006 2:15:04 PM org.springframework.context.support.AbstractApplicationContext initApplicationEventMulticaster INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [EMAIL PROTECTED] dc4] Jun 13, 2006 2:15:04 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [profiledao,bindao,portfoliodao,keyprofiledao,profileDataSource,SessionF actory,exampleHibernateProperties]; root of BeanFactory hierarchy] Jun 13, 2006 2:15:04 PM org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName INFO: Loaded JDBC driver: com.mysql.jdbc.Driver Jun 13, 2006 2:15:04 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues INFO: Mapping class: com.fss.dps.persistence.CardProfile -> CardProfile Jun 13, 2006 2:15:04 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues INFO: Mapping class: com.fss.dps.persistence.BinBean -> BIN Jun 13, 2006 2:15:04 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues INFO: Mapping class: com.fss.dps.persistence.ProductPortfolio -> ProductPortfolio Jun 13, 2006 2:15:04 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues INFO: Mapping class: com.fss.dps.forms.KeyprofileForm -> keystore Jun 13, 2006 2:15:04 PM org.springframework.orm.hibernate3.LocalSessionFactoryBean afterPropertiesSet INFO: Building new Hibernate SessionFactory Jun 13, 2006 2:15:04 PM org.hibernate.cfg.Configuration secondPassCompile INFO: processing extends queue Jun 13, 2006 2:15:04 PM org.hibernate.cfg.Configuration secondPassCompile INFO: processing collection mappings Jun 13, 2006 2:15:04 PM org.hibernate.cfg.Configuration secondPassCompile INFO: processing association property references Jun 13, 2006 2:15:04 PM org.hibernate.cfg.Configuration secondPassCompile INFO: processing foreign key constraints Jun 13, 2006 2:15:04 PM org.hibernate.connection.ConnectionProviderFactory newConnectionProvider INFO: Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider Jun 13, 2006 2:15:04 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: RDBMS: MySQL, version: 5.0.16 Jun 13, 2006 2:15:04 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.11 ( $Date: 2005-09-21 18:20:03 +0000 (Wed, 21 Sep 2005) $, $Revision: 4287 $ ) Jun 13, 2006 2:15:04 PM org.hibernate.dialect.Dialect <init> INFO: Using dialect: org.hibernate.dialect.MySQLDialect Jun 13, 2006 2:15:04 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory INFO: Using default transaction strategy (direct JDBC transactions) Jun 13, 2006 2:15:04 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) Jun 13, 2006 2:15:04 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Automatic flush during beforeCompletion(): disabled Jun 13, 2006 2:15:04 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Automatic session close at end of transaction: disabled Jun 13, 2006 2:15:04 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC batch size: 15 Jun 13, 2006 2:15:04 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC batch updates for versioned data: disabled Jun 13, 2006 2:15:04 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Scrollable result sets: enabled Jun 13, 2006 2:15:04 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: JDBC3 getGeneratedKeys(): enabled Jun 13, 2006 2:15:04 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Connection release mode: on_close Jun 13, 2006 2:15:04 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Maximum outer join fetch depth: 2 Jun 13, 2006 2:15:04 PM org.hibernate.cfg.SettingsFactory buildSettings INFO: Default batch fe regards, Mansoor --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]