Codota Logo
ILoggerFactory
Code IndexAdd Codota to your IDE (free)

How to use
ILoggerFactory
in
org.slf4j

Best Java code snippets using org.slf4j.ILoggerFactory (Showing top 20 results out of 540)

  • Common ways to obtain ILoggerFactory
private void myMethod () {
ILoggerFactory i =
  • Codota IconLoggerFactory.getILoggerFactory()
  • Codota IconStaticLoggerBinder.getSingleton().getLoggerFactory()
  • Smart code suggestions by Codota
}
origin: redisson/redisson

/**
 * Return a logger named according to the name parameter using the
 * statically bound {@link ILoggerFactory} instance.
 * 
 * @param name
 *            The name of the logger.
 * @return logger
 */
public static Logger getLogger(String name) {
  ILoggerFactory iLoggerFactory = getILoggerFactory();
  return iLoggerFactory.getLogger(name);
}
origin: wildfly/wildfly

/**
 * Return a logger named according to the name parameter using the
 * statically bound {@link ILoggerFactory} instance.
 * 
 * @param name
 *            The name of the logger.
 * @return logger
 */
public static Logger getLogger(String name) {
  ILoggerFactory iLoggerFactory = getILoggerFactory();
  return iLoggerFactory.getLogger(name);
}
origin: embulk/embulk

@Deprecated  // @see docs/design/slf4j.md
public Logger getLogger(String name) {
  // TODO: Make it always return org.slf4j.LoggerFactory.getLogger(...).
  return loggerFactory.getLogger(name);
}
origin: embulk/embulk

@Inject
public RawScriptingContainerProvider(final Injector injector, final ScriptingContainerDelegate delegate) {
  this.delegate = delegate;
  this.logger = injector.getInstance(ILoggerFactory.class).getLogger("init");
}
origin: neo4j/neo4j

@Override
public Log getLog( Class loggingClass )
{
  return new Slf4jLog( loggerFactory.getLogger( loggingClass.getName() ) );
}
origin: embulk/embulk

@Deprecated  // @see docs/design/slf4j.md
public Logger getLogger(Class<?> name) {
  // TODO: Make it always return org.slf4j.LoggerFactory.getLogger(...).
  return loggerFactory.getLogger(name.getName());
}
origin: neo4j/neo4j

  @Override
  public Log getLog( String context )
  {
    return new Slf4jLog( loggerFactory.getLogger( context ) );
  }
}
origin: embulk/embulk

private EmbulkEmbed(ConfigSource systemConfig, Injector injector) {
  this.injector = injector;
  this.logger = injector.getInstance(org.slf4j.ILoggerFactory.class).getLogger(EmbulkEmbed.class.getName());
  this.bulkLoader = injector.getInstance(BulkLoader.class);
  this.guessExecutor = injector.getInstance(GuessExecutor.class);
  this.previewExecutor = injector.getInstance(PreviewExecutor.class);
}
origin: apache/maven

public Logger getLoggerForComponent( String role )
{
  return new Slf4jLogger( loggerFactory.getLogger( role ) );
}
origin: linkedin/parseq

@Override
public Logger getLogger(String s) {
 _count.incrementAndGet();
 return _loggerFactory.getLogger(s);
}
origin: apache/maven

/**
 * The logger name for a component with a non-null hint is <code>role.hint</code>.
 * <b>Warning</b>: this does not conform to logger name as class name convention.
 * (and what about <code>null</code> and <code>default</code> hint equivalence?)
 */
public Logger getLoggerForComponent( String role, String hint )
{
  return ( null == hint
    ? getLoggerForComponent( role )
    : new Slf4jLogger( loggerFactory.getLogger( role + '.' + hint ) ) );
}
origin: apache/maven

slf4jLogger = slf4jLoggerFactory.getLogger( this.getClass().getName() );
origin: embulk/embulk

@Inject
public ScriptingContainerProvider(Injector injector, @ForSystemConfig ConfigSource systemConfig) {
  // use_global_ruby_runtime is valid only when it's guaranteed that just one Injector is
  // instantiated in this JVM.
  this.useGlobalRubyRuntime = systemConfig.get(boolean.class, "use_global_ruby_runtime", false);
  this.initializer = JRubyInitializer.of(
      injector,
      injector.getInstance(ILoggerFactory.class).getLogger("init"),
      systemConfig.get(String.class, "gem_home", null),
      systemConfig.get(String.class, "jruby_use_default_embulk_gem_home", "false").equals("true"),
      // TODO get jruby-home from systemConfig to call jruby.container.setHomeDirectory
      systemConfig.get(List.class, "jruby_load_path", null),
      systemConfig.get(List.class, "jruby_classpath", new ArrayList()),
      systemConfig.get(List.class, "jruby_command_line_options", null),
      systemConfig.get(String.class, "jruby_global_bundler_plugin_source_directory", null));
}
origin: linkedin/parseq

@Test
public void testCaching() throws Exception {
 CountingLoggerFactory loggerFactory = new CountingLoggerFactory();
 final ILoggerFactory cachedFactory = new CachedLoggerFactory(loggerFactory);
 ExecutorService executorService = Executors.newFixedThreadPool(5);
 CountDownLatch startRace = new CountDownLatch(1);
 CountDownLatch stopRace = new CountDownLatch(5);
 for (int i = 0; i < 5; i++) {
  executorService.submit(() -> {
   try {
    startRace.await();
    cachedFactory.getLogger("com.linkedin.parseq.Task");
    stopRace.countDown();
   } catch (Exception e) {
    Assert.fail();
   }
  } );
 }
 // start race
 startRace.countDown();
 assertTrue(stopRace.await(5000, TimeUnit.MILLISECONDS));
 Assert.assertEquals(loggerFactory.getCount(), 1);
}
origin: linkedin/parseq

_allLogger = loggerFactory.getLogger(LOGGER_BASE + ":all");
_rootLogger = loggerFactory.getLogger(LOGGER_BASE + ":root");
origin: linkedin/parseq

public PlanContext(final Engine engine, final Executor taskExecutor, final DelayedExecutor timerExecutor,
  final ILoggerFactory loggerFactory, final Logger allLogger, final Logger rootLogger, final String planClass,
  Task<?> root, final int maxRelationshipsPerTrace, final PlanDeactivationListener planDeactivationListener,
  PlanCompletionListener planCompletionListener, final SerialExecutor.TaskQueue<PrioritizableRunnable> taskQueue,
  final boolean drainSerialExecutorQueue, ExecutionMonitor executionMonitor) {
 _id = IdGenerator.getNextId();
 _root = root;
 _relationshipsBuilder = new TraceBuilder(maxRelationshipsPerTrace, planClass, _id);
 _engine = engine;
 _taskExecutor = new SerialExecutor(taskExecutor, new CancellingPlanExceptionHandler(root), () -> {
  try {
   planDeactivationListener.onPlanDeactivated(PlanContext.this);
  } catch (Throwable t) {
   LOG.error("Failed to notify deactivation listener " + planDeactivationListener, t);
  }
 }, taskQueue, drainSerialExecutorQueue, executionMonitor);
 _timerScheduler = timerExecutor;
 final Logger planLogger = loggerFactory.getLogger(Engine.LOGGER_BASE + ":planClass=" + planClass);
 _taskLogger = new TaskLogger(_id, root.getId(), allLogger, rootLogger, planLogger);
 _planClass = planClass;
 _planCompletionListener = planCompletionListener;
 _pending = new AtomicInteger(1);
 _root.addListener(p -> done());
}
origin: embulk/embulk

jruby.runScriptlet("Embulk::Logger"),
"new",
injector.getInstance(ILoggerFactory.class).getLogger("ruby")));
origin: apache/maven

slf4jLogger = slf4jLoggerFactory.getLogger( this.getClass().getName() );
origin: camunda/camunda-bpm-platform

/**
 * Return a logger named according to the name parameter using the statically
 * bound {@link ILoggerFactory} instance.
 *
 * @param name The name of the logger.
 * @return logger
 */
public static Logger getLogger(String name) {
 ILoggerFactory iLoggerFactory = getILoggerFactory();
 return iLoggerFactory.getLogger(name);
}
origin: org.slf4j/slf4j-log4j13

/**
 * Return a logger named according to the name parameter using the statically
 * bound {@link ILoggerFactory} instance.
 * 
 * @param name
 *          The name of the logger.
 * @return logger
 */
public static Logger getLogger(String name) {
 return loggerFactory.getLogger(name);
}
org.slf4jILoggerFactory

Javadoc

ILoggerFactory instances manufacture Loggerinstances by name.

Most users retrieve Logger instances through the static LoggerFactory#getLogger(String) method. An instance of of this interface is bound internally with LoggerFactory class at compile time.

Most used methods

  • getLogger
    Return an appropriate Logger instance as specified by thename parameter. Null-valued name arguments

Popular in Java

  • Finding current android device location
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • Collectors (java.util.stream)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now