Skip to content

Commit

Permalink
#404: implemented requested changes
Browse files Browse the repository at this point in the history
renamed TestLogger to IdeLoggerAdapter
added missing param to javadoc
renamed TestProvider to TestProviderImpl
renamed TestLoggerFactory to TestLoggerFactoryImpl
  • Loading branch information
jan-vcapgemini committed Jan 22, 2025
1 parent fc74f71 commit 2fb8f0d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class IdeSubLoggerOut extends AbstractIdeSubLogger {
* @param out the {@link Appendable} to {@link Appendable#append(CharSequence) write} log messages to.
* @param colored - {@code true} for colored output according to {@link IdeLogLevel}, {@code false} otherwise.
* @param minLogLevel the minimum log level (threshold).
* @param listener the {@link IdeLogListener} to listen to.
*/
public IdeSubLoggerOut(IdeLogLevel level, Appendable out, boolean colored, IdeLogLevel minLogLevel, IdeLogListener listener) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
package com.devonfw.tools.ide.serviceprovider;

import org.slf4j.Logger;
import org.slf4j.Marker;

public class TestLogger implements org.slf4j.Logger {
/**
* Implementation of {@link Logger}.
*/
public class IdeLoggerAdapter implements Logger {

private final String name;

public TestLogger(String name) {
/**
* The constructor.
*
* @param name of the logger.
*/
public IdeLoggerAdapter(String name) {

this.name = name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
import org.slf4j.ILoggerFactory;
import org.slf4j.Logger;

public class TestLoggerFactory implements ILoggerFactory {
/**
* Implementation of {@link ILoggerFactory}.
*/
public class TestLoggerFactoryImpl implements ILoggerFactory {

@Override
public Logger getLogger(String name) {

return new TestLogger(name);
return new IdeLoggerAdapter(name);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
import org.slf4j.spi.MDCAdapter;
import org.slf4j.spi.SLF4JServiceProvider;

public class TestProvider implements SLF4JServiceProvider {
/**
* Implementation of {@link SLF4JServiceProvider}.
*/
public class TestProviderImpl implements SLF4JServiceProvider {

private final String REQUESTED_API_VERSION = "2.0.12";
private TestLoggerFactory testLoggerFactory;
private TestLoggerFactoryImpl testLoggerFactory;


@Override
Expand Down Expand Up @@ -38,6 +41,6 @@ public String getRequestedApiVersion() {

@Override
public void initialize() {
testLoggerFactory = new TestLoggerFactory();
testLoggerFactory = new TestLoggerFactoryImpl();
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
com.devonfw.tools.ide.serviceprovider.TestProvider
com.devonfw.tools.ide.serviceprovider.TestProviderImpl

0 comments on commit 2fb8f0d

Please sign in to comment.