Package io.github.jonloucks.metalog.api
Interface Metalog.Config
- All Known Subinterfaces:
Metalog.Config.Builder
- Enclosing interface:
- Metalog
public static interface Metalog.Config
The configuration used to create a new Metalog instance.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Metalog.Config
The default configuration used when creating a new Metalog instance -
Method Summary
Modifier and TypeMethodDescriptiondefault io.github.jonloucks.contracts.api.Contracts
default int
The limit on how many log messages can be queued for processing If the subscribers get behind.default String
default Class<? extends MetalogFactory>
default Duration
How long to wait for logging to shut down before giving updefault boolean
true if all thread log messages are processed in FIFO orderdefault int
The maximum number of background threads dispatching log messages to subscribers.default boolean
default boolean
-
Field Details
-
DEFAULT
The default configuration used when creating a new Metalog instance
-
-
Method Details
-
useReflection
default boolean useReflection()- Returns:
- if true, reflection might be used to locate the MetalogFactory
-
reflectionClassName
- Returns:
- the class name to use if reflection is used to find the MetalogFactory
-
useServiceLoader
default boolean useServiceLoader()- Returns:
- if true, the ServiceLoader might be used to locate the MetalogFactory
-
serviceLoaderClass
- Returns:
- the class name to load from the ServiceLoader to find the MetalogFactory
-
contracts
default io.github.jonloucks.contracts.api.Contracts contracts()- Returns:
- the contracts, some use case have their own Contracts instance.
-
keyedQueueLimit
default int keyedQueueLimit()The limit on how many log messages can be queued for processing If the subscribers get behind. Note: It is possible to run out of memory if this value is too large. If the value is too small, for example 1, then every keyed log message will block until the previous message has been consumed.- Returns:
- the limit.
-
unkeyedThreadCount
default int unkeyedThreadCount()The maximum number of background threads dispatching log messages to subscribers.- Returns:
- the maximum number of background threads
-
unkeyedFairness
default boolean unkeyedFairness()true if all thread log messages are processed in FIFO order- Returns:
- true if all thread log messages are processed in FIFO order
-
shutdownTimeout
How long to wait for logging to shut down before giving up- Returns:
- the timeout duration
-