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

How to use
getLogger
method
in
org.slf4j.ILoggerFactory

Best Java code snippets using org.slf4j.ILoggerFactory.getLogger (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.sonatype.sisu/sisu-guice

public org.slf4j.Logger get(InternalContext context, Dependency<?> dependency, boolean linked) {
 InjectionPoint injectionPoint = dependency.getInjectionPoint();
 if (injectionPoint != null) {
  return loggerFactory().getLogger(injectionPoint.getMember().getDeclaringClass().getName());
 }
 return loggerFactory().getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
}
org.slf4jILoggerFactorygetLogger

Javadoc

Return an appropriate Logger instance as specified by the name parameter.

If the name parameter is equal to Logger#ROOT_LOGGER_NAME, that is the string value "ROOT" (case insensitive), then the root logger of the underlying logging system is returned.

Null-valued name arguments are considered invalid.

Certain extremely simple logging systems, e.g. NOP, may always return the same logger instance regardless of the requested name.

Popular methods of ILoggerFactory

    Popular in Java

    • Reading from database using SQL prepared statement
    • getOriginalFilename (MultipartFile)
      Return the original filename in the client's filesystem.This may contain path information depending
    • putExtra (Intent)
    • setRequestProperty (URLConnection)
      Sets the general request property. If a property with the key already exists, overwrite its value wi
    • FileReader (java.io)
      A specialized Reader that reads from a file in the file system. All read requests made by calling me
    • IOException (java.io)
      Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
    • HttpURLConnection (java.net)
      An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
    • URL (java.net)
      A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
    • Date (java.sql)
      A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
    • SortedSet (java.util)
      A Set that further provides a total ordering on its elements. The elements are ordered using their C
    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