2 Replies Latest reply on Dec 11, 2008 4:56 AM by jaikiran pai

    Using java.util.logging inside an EJB

    sajith v Newbie

      Hi ,

      i am using a logger inside a session EJB with EJB3.0 specification.
      The problem is that the messages sent by the logger to the console are sent to the Application Server's standard error instead of Standard output.

      @Stateful
      public class LoggerBean implements LoggerRemote {
      
      
       private static final Logger logger = Logger.getLogger( "a" ) ;
      
       public LoggerBean( ) {
       logger.setLevel( Level.ALL ) ;
       logger.info( "LoggerBean" );
       }
      
       public void printHello( ) {
       logger.info( "Hello World!!!" );
       }
      }
      


      The log showing in the application server console is the following
      11:46:37,192 ERROR [STDERR] Dec 11, 2008 11:46:37 AM com.suntec.tbms5.ejb.logging.LoggerBean <init>
      INFO: LoggerBean
      


      Can anybody help me ? Whats happening inside the EJB container ?
      Thanks in advance