Skip to content

Commit

Permalink
+ rename
Browse files Browse the repository at this point in the history
  • Loading branch information
q3769 committed Feb 18, 2024
1 parent c6d2212 commit 717cd3a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<groupId>io.github.elf4j</groupId>
<artifactId>elf4j-engine</artifactId>
<version>15.1.1</version>
<version>15.1.2</version>
<packaging>jar</packaging>
<name>elf4j-engine</name>
<description>A stand-alone Java log engine implementing the ELF4J (Easy Logging Facade for Java) API</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import elf4j.engine.service.configuration.LogServiceConfiguration;
import elf4j.engine.service.configuration.LoggerOutputLevelThreshold;
import elf4j.engine.service.util.StackTraceUtils;
import elf4j.engine.service.writer.ConseqWriterGroup;
import elf4j.engine.service.writer.GroupWriter;
import elf4j.engine.service.writer.LogWriter;
import elf4j.util.IeLogger;
import java.util.Map;
Expand All @@ -53,7 +53,7 @@ public EventingNativeLoggerService(@NonNull LogServiceConfiguration logServiceCo
return;
}
noop = false;
logWriter = ConseqWriterGroup.from(logServiceConfiguration);
logWriter = GroupWriter.from(logServiceConfiguration);
loggerOutputLevelThreshold = LoggerOutputLevelThreshold.from(logServiceConfiguration);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* order; meanwhile, logs from the same caller thread will arrive sequentially in the same order as they are called in
* the original thread.
*/
public class ConseqWriterGroup implements LogWriter, NativeLogServiceManager.Stoppable {
public class GroupWriter implements LogWriter, NativeLogServiceManager.Stoppable {
private static final int DEFAULT_CONCURRENCY = Runtime.getRuntime().availableProcessors();
private final List<LogWriter> writers;
private final ConseqExecutor conseqExecutor;
Expand All @@ -60,7 +60,7 @@ public class ConseqWriterGroup implements LogWriter, NativeLogServiceManager.Sto
@ToString.Exclude
private Boolean includeCallerDetail;

private ConseqWriterGroup(@NonNull List<LogWriter> writers, ConseqExecutor conseqExecutor) {
private GroupWriter(@NonNull List<LogWriter> writers, ConseqExecutor conseqExecutor) {
this.writers = writers;
this.conseqExecutor = conseqExecutor;
IeLogger.INFO.log("{} service writer(s) in {}", writers.size(), this);
Expand All @@ -71,15 +71,15 @@ private ConseqWriterGroup(@NonNull List<LogWriter> writers, ConseqExecutor conse
* @param logServiceConfiguration entire configuration
* @return the composite writer containing all writers configured in the specified properties
*/
@NonNull public static ConseqWriterGroup from(LogServiceConfiguration logServiceConfiguration) {
@NonNull public static GroupWriter from(LogServiceConfiguration logServiceConfiguration) {
List<LogWriterType> logWriterTypes = new ArrayList<>(getLogWriterTypes(logServiceConfiguration));
if (logWriterTypes.isEmpty()) {
logWriterTypes.add(new StandardStreamWriter.Type());
}
List<LogWriter> logWriters = logWriterTypes.stream()
.flatMap(t -> t.getLogWriters(logServiceConfiguration).stream())
.collect(Collectors.toList());
return new ConseqWriterGroup(logWriters, ConseqExecutor.instance(getConcurrency(logServiceConfiguration)));
return new GroupWriter(logWriters, ConseqExecutor.instance(getConcurrency(logServiceConfiguration)));
}

private static int getConcurrency(@NonNull LogServiceConfiguration logServiceConfiguration) {
Expand Down

0 comments on commit 717cd3a

Please sign in to comment.