reconstruct code && add advice for out of memory error.
This commit is contained in:
@@ -23,7 +23,7 @@ import org.jackhuang.hellominecraft.logging.layout.DefaultLayout;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
|
||||
public class Configuration {
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.jackhuang.hellominecraft.logging;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public enum Level {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.jackhuang.hellominecraft.logging.message.IMessage;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class LogEvent {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.jackhuang.hellominecraft.logging;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class LoggingException extends RuntimeException {
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.jackhuang.hellominecraft.logging.layout.ILayout;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public abstract class AbstractAppender implements IAppender {
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.jackhuang.hellominecraft.logging.layout.ILayout;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class ConsoleAppender extends OutputStreamAppender {
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.jackhuang.hellominecraft.logging.layout.ILayout;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public interface IAppender {
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.jackhuang.hellominecraft.logging.layout.ILayout;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public abstract class OutputStreamAppender extends AbstractAppender {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.jackhuang.hellominecraft.logging.LogEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public abstract class AbstractStringLayout implements ILayout<String> {
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.jackhuang.hellominecraft.logging.LogEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class DefaultLayout extends AbstractStringLayout {
|
||||
private static final SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.jackhuang.hellominecraft.logging.LogEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
* @param <T>
|
||||
*/
|
||||
public interface ILayout<T extends Serializable> {
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.jackhuang.hellominecraft.logging.message.IMessage;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public interface ILogger {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.jackhuang.hellominecraft.logging.message;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public abstract class AbstractMessageFactory
|
||||
implements IMessageFactory {
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public interface IMessage extends Serializable {
|
||||
String getFormattedMessage();
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.jackhuang.hellominecraft.logging.message;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public abstract interface IMessageFactory {
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class ParameterizedMessage
|
||||
implements IMessage {
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.jackhuang.hellominecraft.logging.message;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public final class ParameterizedMessageFactory extends AbstractMessageFactory {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.jackhuang.hellominecraft.logging.message;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hyh
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class SimpleMessage
|
||||
implements IMessage {
|
||||
|
||||
Reference in New Issue
Block a user