Module io.netty5.resolver.dns
Package io.netty5.resolver.dns
Class LoggingDnsQueryLifeCycleObserverFactory
- java.lang.Object
-
- io.netty5.resolver.dns.LoggingDnsQueryLifeCycleObserverFactory
-
- All Implemented Interfaces:
DnsQueryLifecycleObserverFactory
public final class LoggingDnsQueryLifeCycleObserverFactory extends Object implements DnsQueryLifecycleObserverFactory
ADnsQueryLifecycleObserverFactory
that enables detailed logging in theDnsNameResolver
.When configured on the resolver, detailed trace information will be generated so that it is easier to understand the cause of resolution failure.
-
-
Constructor Summary
Constructors Constructor Description LoggingDnsQueryLifeCycleObserverFactory()
CreateDnsQueryLifecycleObserver
instances that log events at the defaultLogLevel.DEBUG
level.LoggingDnsQueryLifeCycleObserverFactory(LogLevel level)
CreateDnsQueryLifecycleObserver
instances that log events at the given log level.LoggingDnsQueryLifeCycleObserverFactory(Class<?> classContext, LogLevel level)
CreateDnsQueryLifecycleObserver
instances that log events to a logger with the given class context, at the given log level.LoggingDnsQueryLifeCycleObserverFactory(String name, LogLevel level)
CreateDnsQueryLifecycleObserver
instances that log events to a logger with the given name context, at the given log level.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DnsQueryLifecycleObserver
newDnsQueryLifecycleObserver(DnsQuestion question)
Create a new instance of aDnsQueryLifecycleObserver
.
-
-
-
Constructor Detail
-
LoggingDnsQueryLifeCycleObserverFactory
public LoggingDnsQueryLifeCycleObserverFactory()
CreateDnsQueryLifecycleObserver
instances that log events at the defaultLogLevel.DEBUG
level.
-
LoggingDnsQueryLifeCycleObserverFactory
public LoggingDnsQueryLifeCycleObserverFactory(LogLevel level)
CreateDnsQueryLifecycleObserver
instances that log events at the given log level.- Parameters:
level
- The log level to use for logging resolver events.
-
LoggingDnsQueryLifeCycleObserverFactory
public LoggingDnsQueryLifeCycleObserverFactory(Class<?> classContext, LogLevel level)
CreateDnsQueryLifecycleObserver
instances that log events to a logger with the given class context, at the given log level.- Parameters:
classContext
- The class context for the logger to use.level
- The log level to use for logging resolver events.
-
LoggingDnsQueryLifeCycleObserverFactory
public LoggingDnsQueryLifeCycleObserverFactory(String name, LogLevel level)
CreateDnsQueryLifecycleObserver
instances that log events to a logger with the given name context, at the given log level.- Parameters:
name
- The name for the logger to use.level
- The log level to use for logging resolver events.
-
-
Method Detail
-
newDnsQueryLifecycleObserver
public DnsQueryLifecycleObserver newDnsQueryLifecycleObserver(DnsQuestion question)
Description copied from interface:DnsQueryLifecycleObserverFactory
Create a new instance of aDnsQueryLifecycleObserver
. This will be called at the start of a new query.- Specified by:
newDnsQueryLifecycleObserver
in interfaceDnsQueryLifecycleObserverFactory
- Parameters:
question
- The question being asked.- Returns:
- a new instance of a
DnsQueryLifecycleObserver
.
-
-