mirror of https://github.com/Qortal/AT
Browse Source
We now use a logger factory, which means loggers can be created per class. This allows use of 'wrapped' Apache log4j2 loggers with the added benefit of more accurate class/line-number reporting.master
catbref
4 years ago
9 changed files with 61 additions and 34 deletions
@ -0,0 +1,11 @@
|
||||
package org.ciyam.at; |
||||
|
||||
public interface AtLogger { |
||||
|
||||
void error(final String message); |
||||
|
||||
void debug(final String message); |
||||
|
||||
void echo(final String message); |
||||
|
||||
} |
@ -0,0 +1,7 @@
|
||||
package org.ciyam.at; |
||||
|
||||
public interface AtLoggerFactory { |
||||
|
||||
AtLogger create(final Class<?> loggerName); |
||||
|
||||
} |
@ -1,11 +0,0 @@
|
||||
package org.ciyam.at; |
||||
|
||||
public interface LoggerInterface { |
||||
|
||||
public void error(String message); |
||||
|
||||
public void debug(String message); |
||||
|
||||
public void echo(String message); |
||||
|
||||
} |
@ -0,0 +1,13 @@
|
||||
package org.ciyam.at.test; |
||||
|
||||
import org.ciyam.at.AtLogger; |
||||
import org.ciyam.at.AtLoggerFactory; |
||||
|
||||
public class TestLoggerFactory implements AtLoggerFactory { |
||||
|
||||
@Override |
||||
public AtLogger create(Class<?> loggerName) { |
||||
return new TestLogger(); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue