org.jdtaus.core.logging.spi.Logger类的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(606)

本文整理了Java中org.jdtaus.core.logging.spi.Logger类的一些代码示例,展示了Logger类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger类的具体详情如下:
包路径:org.jdtaus.core.logging.spi.Logger
类名称:Logger

Logger介绍

[英]Logs events for a specific component.

jDTAUS Core SPI Logger specification to be used by implementations to log technical events.
[中]记录特定组件的事件。
jDTAUS核心SPI记录器规范,用于实现记录技术事件。

代码示例

代码示例来源:origin: org.jdtaus.core.monitor/jdtaus-core-task-monitor

  1. public void start()
  2. {
  3. super.start();
  4. if ( getLogger().isDebugEnabled() )
  5. {
  6. getLogger().debug( getThreadStartedMessage(
  7. getLocale(), new Long( this.pollIntervalMillis ) ) );
  8. }
  9. }

代码示例来源:origin: org.jdtaus.core/jdtaus-core-it

  1. /**
  2. * Test the various logger methods to not throw any exceptions.
  3. */
  4. public void testLog() throws Exception
  5. {
  6. assert this.getLogger() != null;
  7. this.getLogger().debug( "TEST" );
  8. this.getLogger().debug( new Exception() );
  9. this.getLogger().error( "TEST" );
  10. this.getLogger().error( new Exception() );
  11. this.getLogger().fatal( "TEST" );
  12. this.getLogger().fatal( new Exception() );
  13. this.getLogger().info( "TEST" );
  14. this.getLogger().info( new Exception() );
  15. this.getLogger().trace( "TEST" );
  16. this.getLogger().trace( new Exception() );
  17. this.getLogger().warn( "TEST" );
  18. this.getLogger().warn( new Exception() );
  19. }

代码示例来源:origin: org.jdtaus.core/jdtaus-core-it

  1. /**
  2. * Tests the {@link Logger#isInfoEnabled() isXxxEnabled()} methods to not
  3. * throw any exceptions.
  4. */
  5. public void testIsEnabled() throws Exception
  6. {
  7. assert this.getLogger() != null;
  8. this.getLogger().isDebugEnabled();
  9. this.getLogger().isErrorEnabled();
  10. this.getLogger().isFatalEnabled();
  11. this.getLogger().isInfoEnabled();
  12. this.getLogger().isTraceEnabled();
  13. this.getLogger().isWarnEnabled();
  14. }

代码示例来源:origin: org.jdtaus.banking/jdtaus-banking-ri-bankleitzahlenverzeichnis

  1. this.getLogger().info( this.getReloadInfoMessage(
  2. this.getLocale(), new Date( this.lastModifiedMillis ),
  3. new Date( this.provider.getLastModifiedMillis() ) ) );
  4. if ( this.getLogger().isDebugEnabled() )
  5. this.getLogger().debug( this.getOutdatedInfoMessage(
  6. this.getLocale(), record.getBankCode().format( Bankleitzahl.LETTER_FORMAT ) ) );
  7. this.initialized = true;
  8. this.getLogger().info( this.getBankfileInfoMessage(
  9. this.getLocale(), new Long( processedRecords ), new Integer( rsrc.length ) ) );
  10. this.getLogger().warn( this.getNoBankfilesFoundMessage( this.getLocale() ) );

代码示例来源:origin: org.jdtaus.banking/jdtaus-banking-utilities

  1. final boolean log = this.getLogger().isDebugEnabled();
  2. final boolean upgrade = this.getFormat() < file.getFormat();
  3. this.getLogger().debug( this.getAddRecordInfoMessage(
  4. this.getLocale(), String.valueOf( newVersion.getChangeLabel() ),
  5. newVersion.getSerialNumber() ) );
  6. this.getLogger().debug( this.getModifyRecordInfoMessage(
  7. this.getLocale(), String.valueOf( newVersion.getChangeLabel() ),
  8. newVersion.getSerialNumber() ) );
  9. if ( this.getLogger().isInfoEnabled() )
  10. this.getLogger().info( this.getBankcodeFileUpgradeInfoMessage(
  11. this.getLocale(), toFormatName( this.format ), toFormatName( file.getFormat() ) ) );
  12. this.getLogger().debug( this.getRemoveRecordInfoMessage(
  13. this.getLocale(), String.valueOf( oldVersion.getChangeLabel() ),
  14. oldVersion.getSerialNumber() ) );

代码示例来源:origin: org.jdtaus.core.sax/jdtaus-core-entity-resolver

  1. schemaSource.setSystemId( urls[i].toExternalForm() );
  2. if ( this.getLogger().isDebugEnabled() )
  3. this.getLogger().debug(
  4. this.getResolvedSystemIdMessage(
  5. this.getLocale(), systemId,
  6. this.getLogger().warn( this.getUnsupportedSystemIdUriMessage(
  7. this.getLocale(), systemId, systemUri.toASCIIString() ) );
  8. this.getLogger().warn( this.getUnsupportedSystemIdUriMessage(
  9. this.getLocale(), systemId, e.getMessage() ) );

代码示例来源:origin: org.jdtaus.core/jdtaus-core-utilities

  1. this.getLogger().error( event.getMessages()[i].getText(
  2. this.getLocale() ) );
  3. this.getLogger().info( event.getMessages()[i].getText(
  4. this.getLocale() ) );
  5. this.getLogger().warn( event.getMessages()[i].getText(
  6. this.getLocale() ) );
  7. this.getLogger().warn(
  8. this.getUnknownMessageEventTypeMessage(
  9. this.getLocale(),

代码示例来源:origin: org.jdtaus.banking/jdtaus-banking-ri-textschluesselverzeichnis

  1. doc = validatingParser.parse( stream );
  2. else if ( this.getLogger().isInfoEnabled() )
  3. this.getLogger().info(
  4. this.getNoSchemaLocationMessage( this.getLocale(), resource.toExternalForm() ) );
  5. this.getLogger().warn( this.getNoTextschluesselFoundMessage( this.getLocale() ) );

代码示例来源:origin: org.jdtaus.banking/jdtaus-banking-ri-textschluesselverzeichnis

  1. public void warning( final SAXParseException e )
  2. throws SAXException
  3. {
  4. getLogger().warn( getParseExceptionMessage(
  5. getLocale(), resource.toExternalForm(),
  6. e.getMessage(), new Integer( e.getLineNumber() ),
  7. new Integer( e.getColumnNumber() ) ) );
  8. }

代码示例来源:origin: org.jdtaus.banking/jdtaus-banking-ri-textschluesselverzeichnis

  1. /**
  2. * Adds a resource to the list of resources to monitor for changes.
  3. *
  4. * @param url the URL of the resource to monitor for changes.
  5. *
  6. * @throws NullPointerException if {@code url} is {@code null}.
  7. */
  8. private void monitorResource( final URL url )
  9. {
  10. if ( url == null )
  11. {
  12. throw new NullPointerException( "url" );
  13. }
  14. try
  15. {
  16. final File file = new File( new URI( url.toString() ) );
  17. this.monitorMap.put( file, new Long( file.lastModified() ) );
  18. this.getLogger().info( this.getMonitoringInfoMessage( this.getLocale(), file.getAbsolutePath() ) );
  19. }
  20. catch ( final IllegalArgumentException e )
  21. {
  22. this.getLogger().info( this.getNotMonitoringWarningMessage(
  23. this.getLocale(), url.toExternalForm(), e.getMessage() ) );
  24. }
  25. catch ( final URISyntaxException e )
  26. {
  27. this.getLogger().info( this.getNotMonitoringWarningMessage(
  28. this.getLocale(), url.toExternalForm(), e.getMessage() ) );
  29. }
  30. }

代码示例来源:origin: org.jdtaus.banking.dtaus/jdtaus-banking-ri-dtaus

  1. if ( this.getLogger().isInfoEnabled() )
  2. this.getLogger().info( this.getReadNumberIllegalFileInfoMessage(
  3. this.getLocale(), logViolation, new Long( ret ) ) );

代码示例来源:origin: org.jdtaus.core/jdtaus-core-utilities

  1. this.filePointer += len;
  2. this.getLogger().debug(
  3. this.getWriteBypassesCacheMessage(
  4. this.getLocale(),

代码示例来源:origin: org.jdtaus.core/jdtaus-core-utilities

  1. /**
  2. * {@inheritDoc}
  3. * <p>This method logs details of the event's exception to a logger.</p>
  4. *
  5. * @param event the event holding the exception.
  6. */
  7. public void onException( final ExceptionEvent event )
  8. {
  9. if ( event != null )
  10. {
  11. this.getLogger().error( event.getException() );
  12. }
  13. }

代码示例来源:origin: org.jdtaus.editor/jdtaus-editor-client-application

  1. public void uncaughtException(final Thread t, final Throwable e)
  2. getLogger().fatal(e);
  3. String name = EditorBundle.getMissingInformationText(
  4. Locale.getDefault());

代码示例来源:origin: org.jdtaus.core.lang/jdtaus-core-memory-manager

  1. /**
  2. * Forces garbage collection and logs a warning message.
  3. *
  4. * @param repetition number of times garbage collection was already forced.
  5. *
  6. * @see System#gc()
  7. */
  8. private void forceGarbageCollection( final int repetition )
  9. {
  10. this.getLogger().warn( this.getForcingGarbageCollectionMessage(
  11. this.getLocale(), new Integer( repetition ) ) );
  12. System.gc();
  13. }

代码示例来源:origin: org.jdtaus.banking/jdtaus-banking-ri-textschluesselverzeichnis

  1. this.getLogger().info( this.getNoJAXPValidationWarningMessage( this.getLocale(), e.getMessage() ) );
  2. xmlFactory.setValidating( false );

代码示例来源:origin: org.jdtaus.core/jdtaus-core-utilities

  1. this.filePointer += len;
  2. this.getLogger().debug(
  3. this.getReadBypassesCacheMessage(
  4. this.getLocale(),

代码示例来源:origin: org.jdtaus.core/jdtaus-core-utilities

  1. this.getLogger().error( e );
  2. this.getLogger().error( e );

代码示例来源:origin: org.jdtaus.core.sax/jdtaus-core-entity-resolver

  1. if ( this.getLogger().isDebugEnabled() )
  2. this.getLogger().debug(
  3. this.getCandidateSchemaMessage(
  4. this.getLocale(),

代码示例来源:origin: org.jdtaus.core.lang/jdtaus-core-memory-manager

  1. /**
  2. * Logs a warning message for out of memory conditions.
  3. *
  4. * @param requestedByte number of byte requested to be allocated.
  5. * @param availableByte number of byte available when {@code requestedByte}
  6. * were requested.
  7. */
  8. private void logOutOfMemoryWarning( final Long requestedByte,
  9. final Long availableByte )
  10. {
  11. this.getLogger().warn( this.getOutOfMemoryWarningMessage(
  12. this.getLocale(), availableByte, requestedByte ) );
  13. }

相关文章