mirror of
https://github.com/correl/mage.git
synced 2024-11-10 19:19:31 +00:00
Code cleanup (removed unused log4j setting files, added extra info, samples and instructions, removed java logs)
This commit is contained in:
parent
e883ab0d97
commit
ab2fb29270
27 changed files with 183 additions and 182 deletions
3
Mage.Client/config/dev_readme.txt
Normal file
3
Mage.Client/config/dev_readme.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
Xmage load default logs settings from resources.
|
||||
|
||||
If you want to run app with different log configs then copy files from release/config folder and add it to command line.
|
|
@ -1,14 +0,0 @@
|
|||
#default levels
|
||||
log4j.rootLogger=info, console, logfile
|
||||
|
||||
#console log
|
||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.console.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.console.Threshold=info
|
||||
|
||||
#file log
|
||||
log4j.appender.logfile=org.apache.log4j.FileAppender
|
||||
log4j.appender.logfile.File=mageserver.log
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfile.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
|
@ -1,3 +0,0 @@
|
|||
grant {
|
||||
permission java.security.AllPermission;
|
||||
};
|
|
@ -1,14 +1,36 @@
|
|||
#default levels
|
||||
#SAMPLE CLIENT CONFIG (you must enable it by command line)
|
||||
|
||||
#default log level and active appenders (dest for logs)
|
||||
log4j.rootLogger=info, console, logfile
|
||||
|
||||
#custom log level for java classes
|
||||
#log4j.logger.com.j256.ormlite=warn
|
||||
#log4j.logger.mage.player.ai=warn
|
||||
|
||||
#console log
|
||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.console.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.console.Threshold=info
|
||||
|
||||
#file log
|
||||
#file log - without rolling
|
||||
log4j.appender.logfile=org.apache.log4j.FileAppender
|
||||
log4j.appender.logfile.File=mageserver.log
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfile.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfile.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfile.File=mageclient.log
|
||||
|
||||
#file log - rolling by index
|
||||
log4j.appender.logfileByIndex=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.logfileByIndex.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfileByIndex.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfileByIndex.File=mageclient.log
|
||||
log4j.appender.logfileByIndex.MaxFileSize=10MB
|
||||
log4j.appender.logfileByIndex.MaxBackupIndex=5
|
||||
log4j.appender.logfileByIndex.append=true
|
||||
|
||||
#file log - rolling by dayly
|
||||
log4j.appender.logfileByDayly=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.logfileByDayly.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfileByDayly.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfileByDayly.File=mageclient.log
|
||||
log4j.appender.logfileByDayly.DatePattern='.'yyyy-MM-dd
|
3
Mage.Client/release/config/readme.txt
Normal file
3
Mage.Client/release/config/readme.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
It's a sample config files. If you want to use it then run app with that extra commands (add it in launcher settings or in run script):
|
||||
-Dlog4j.configuration=file:./config/log4j.properties
|
||||
-Djava.security.policy=./config/security.policy
|
|
@ -11,7 +11,6 @@ import java.awt.event.InvocationEvent;
|
|||
import java.awt.event.MouseEvent;
|
||||
import java.beans.PropertyVetoException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com, JayDi85
|
||||
|
@ -215,7 +214,7 @@ public class MageDialog extends javax.swing.JInternalFrame {
|
|||
try {
|
||||
this.setClosed(true);
|
||||
} catch (PropertyVetoException ex) {
|
||||
java.util.logging.Logger.getLogger(MageDialog.class.getName()).log(Level.SEVERE, "setClosed(false) failed", ex);
|
||||
LOGGER.error("setClosed(false) failed", ex);
|
||||
}
|
||||
MageFrame.getDesktop().remove(this);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ import org.mage.plugins.card.images.CardDownloadData;
|
|||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
* @author spjspj
|
||||
|
@ -15,7 +14,7 @@ import java.util.logging.Level;
|
|||
public enum GrabbagImageSource implements CardImageSource {
|
||||
|
||||
instance;
|
||||
private static final Logger logger = Logger.getLogger(GrabbagImageSource.class);
|
||||
private static final Logger LOGGER = Logger.getLogger(GrabbagImageSource.class);
|
||||
|
||||
private static final Set<String> supportedSets = new LinkedHashSet<String>() {
|
||||
{
|
||||
|
@ -454,7 +453,7 @@ public enum GrabbagImageSource implements CardImageSource {
|
|||
try {
|
||||
return generateCardUrl(card);
|
||||
} catch (Exception ex) {
|
||||
java.util.logging.Logger.getLogger(GrabbagImageSource.class.getName()).log(Level.SEVERE, null, ex);
|
||||
LOGGER.error(ex.getMessage(), ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ import java.net.Proxy;
|
|||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
* @author Quercitron
|
||||
|
@ -23,7 +22,7 @@ import java.util.logging.Level;
|
|||
public enum TokensMtgImageSource implements CardImageSource {
|
||||
|
||||
instance;
|
||||
private static final Logger logger = Logger.getLogger(TokensMtgImageSource.class);
|
||||
private static final Logger LOGGER = Logger.getLogger(TokensMtgImageSource.class);
|
||||
|
||||
// [[EXP/Name, TokenData>
|
||||
private HashMap<String, List<TokenData>> tokensData;
|
||||
|
@ -99,14 +98,14 @@ public enum TokensMtgImageSource implements CardImageSource {
|
|||
// We don't know these numbers, but we can take them from a file
|
||||
// with tokens information that can be downloaded from the site.
|
||||
if (tokensData.isEmpty()) {
|
||||
logger.info("Source " + getSourceName() + " provides no token data.");
|
||||
LOGGER.info("Source " + getSourceName() + " provides no token data.");
|
||||
return null;
|
||||
}
|
||||
|
||||
String key = set + "/" + name;
|
||||
List<TokenData> list = tokensData.get(key);
|
||||
if (list == null) {
|
||||
logger.warn("Could not find data for token " + name + ", set " + set + ".");
|
||||
LOGGER.warn("Could not find data for token " + name + ", set " + set + ".");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -115,7 +114,7 @@ public enum TokensMtgImageSource implements CardImageSource {
|
|||
tokenData = list.get(0);
|
||||
} else {
|
||||
if (type > list.size()) {
|
||||
logger.warn("Not enough images variants for token with type number " + type + ", name " + name + ", set " + set + '.');
|
||||
LOGGER.warn("Not enough images variants for token with type number " + type + ", name " + name + ", set " + set + '.');
|
||||
return null;
|
||||
}
|
||||
tokenData = list.get(card.getType() - 1);
|
||||
|
@ -137,7 +136,7 @@ public enum TokensMtgImageSource implements CardImageSource {
|
|||
try {
|
||||
getTokensData();
|
||||
} catch (IOException ex) {
|
||||
logger.error(getSourceName() + ": Loading available data failed. " + ex.getMessage());
|
||||
LOGGER.error(getSourceName() + ": Loading available data failed. " + ex.getMessage());
|
||||
}
|
||||
return tokensData.size();
|
||||
}
|
||||
|
@ -172,7 +171,7 @@ public enum TokensMtgImageSource implements CardImageSource {
|
|||
try {
|
||||
getTokensData();
|
||||
} catch (IOException ex) {
|
||||
java.util.logging.Logger.getLogger(TokensMtgImageSource.class.getName()).log(Level.SEVERE, null, ex);
|
||||
LOGGER.error(ex.getMessage(), ex);
|
||||
}
|
||||
String key = setCode + "/" + searchName;
|
||||
return (tokensData.containsKey(key));
|
||||
|
@ -199,12 +198,12 @@ public enum TokensMtgImageSource implements CardImageSource {
|
|||
list = new ArrayList<>();
|
||||
tokensData.put(key, list);
|
||||
supportedSets.add(tokenData.getExpansionSetCode());
|
||||
logger.debug("Added key: " + key);
|
||||
LOGGER.debug("Added key: " + key);
|
||||
}
|
||||
list.add(tokenData);
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
logger.warn("Failed to get tokens description from resource file tokens-mtg-onl-list.csv", exception);
|
||||
LOGGER.warn("Failed to get tokens description from resource file tokens-mtg-onl-list.csv", exception);
|
||||
}
|
||||
|
||||
String urlString = "http://tokens.mtg.onl/data/SetsWithTokens.csv";
|
||||
|
@ -240,7 +239,7 @@ public enum TokensMtgImageSource implements CardImageSource {
|
|||
DownloadPicturesService.getInstance().updateMessage("");
|
||||
DownloadPicturesService.getInstance().showDownloadControls(true);
|
||||
} catch (Exception ex) {
|
||||
logger.warn("Failed to get tokens description from tokens.mtg.onl", ex);
|
||||
LOGGER.warn("Failed to get tokens description from tokens.mtg.onl", ex);
|
||||
DownloadPicturesService.getInstance().updateMessage(ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,26 +1,36 @@
|
|||
#This configuration file is used for the client started from the IDE
|
||||
#default levels
|
||||
log4j.rootLogger=info, console, logfile
|
||||
# Suppress SQL info messages
|
||||
log4j.logger.com.j256.ormlite=warn
|
||||
#default settings (uses for CLIENT run)
|
||||
|
||||
#default log level and active appenders (dest for logs)
|
||||
log4j.rootLogger=info, console, logfile
|
||||
|
||||
#custom log level for java classes
|
||||
#log4j.logger.com.j256.ormlite=warn
|
||||
#log4j.logger.mage.player.ai=warn
|
||||
|
||||
#log4j.logger.org.jboss.remoting=debug
|
||||
#log4j.logger.org.jboss.logging=debug
|
||||
#log4j.logger.mage.player.ai.ComputerPlayer6=debug
|
||||
#log4j.logger.mage.client.remote.CallbackClientImpl=debug
|
||||
#log4j.logger.mage.client.remote.CallbackClientImpl=debug
|
||||
#log4j.logger.mage.client.game.FeedbackPanel=debug
|
||||
#log4j.logger.mage.client.game.FeedbackPanel=warn
|
||||
#log4j.logger.mage.client.util.audio=debug
|
||||
|
||||
#console log
|
||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.console.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.console.Threshold=info
|
||||
|
||||
#file log
|
||||
#file log - without rolling
|
||||
log4j.appender.logfile=org.apache.log4j.FileAppender
|
||||
log4j.appender.logfile.File=mageclient.log
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfile.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfile.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfile.File=mageclient.log
|
||||
|
||||
#file log - rolling by index
|
||||
log4j.appender.logfileByIndex=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.logfileByIndex.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfileByIndex.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfileByIndex.File=mageclient.log
|
||||
log4j.appender.logfileByIndex.MaxFileSize=10MB
|
||||
log4j.appender.logfileByIndex.MaxBackupIndex=5
|
||||
log4j.appender.logfileByIndex.append=true
|
||||
|
||||
#file log - rolling by dayly
|
||||
log4j.appender.logfileByDayly=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.logfileByDayly.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfileByDayly.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfileByDayly.File=mageclient.log
|
||||
log4j.appender.logfileByDayly.DatePattern='.'yyyy-MM-dd
|
|
@ -1,8 +0,0 @@
|
|||
#default levels
|
||||
log4j.rootLogger=debug, console
|
||||
|
||||
#console log
|
||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.console.layout.ConversionPattern=%-5p [%d{yyyy-MM-dd HH:mm [ss:SSS]}] %C{1}[%t]: %m%n
|
||||
log4j.appender.console.Threshold=debug
|
|
@ -1,14 +1,20 @@
|
|||
#default levels
|
||||
#default settings (uses for ADMIN run)
|
||||
|
||||
#default log level and active appenders (dest for logs)
|
||||
log4j.rootLogger=info, console, logfile
|
||||
|
||||
#custom log level for java classes
|
||||
#log4j.logger.com.j256.ormlite=warn
|
||||
#log4j.logger.mage.player.ai=warn
|
||||
|
||||
#console log
|
||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.console.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M%n
|
||||
log4j.appender.console.Threshold=DEBUG
|
||||
log4j.appender.console.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.console.Threshold=debug
|
||||
|
||||
#file log
|
||||
#file log - without rolling
|
||||
log4j.appender.logfile=org.apache.log4j.FileAppender
|
||||
log4j.appender.logfile.File=mageadmin.log
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfile.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M%n
|
||||
log4j.appender.logfile.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfile.File=mageadmin.log
|
3
Mage.Server/config/dev_readme.txt
Normal file
3
Mage.Server/config/dev_readme.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
Xmage load default logs settings from resources.
|
||||
|
||||
If you want to run app with different log configs then copy files from release/config folder and add it to command line.
|
|
@ -1,45 +0,0 @@
|
|||
#default levels
|
||||
#log4j.rootLogger=info, console, logfile
|
||||
log4j.rootLogger=info, RollingAppender
|
||||
log4j.logger.com.j256.ormlite=warn
|
||||
log4j.logger.mage.game=debug
|
||||
log4j.logger.mage.game.GameImpl=debug
|
||||
#log4j.logger.mage.players.PlayerImpl=debug
|
||||
log4j.logger.mage.server=debug
|
||||
#log4j.logger.mage.server.UserManager=debug
|
||||
log4j.logger.mage.server.User=trace
|
||||
#log4j.logger.mage.server.ChatSession=debug
|
||||
#log4j.logger.mage.server.ChatManager=debug
|
||||
#log4j.logger.mage.server.TableController=debug
|
||||
#log4j.logger.mage.server.TableManager=debug
|
||||
#log4j.logger.mage.server.tournament.TournamentManager=debug
|
||||
#log4j.logger.mage.server.game.GameSession=debug
|
||||
log4j.logger.mage.abilities.AbilityImpl=debug
|
||||
log4j.logger.mage.cards.decks=debug
|
||||
log4j.logger.mage.abilities.effects.common.continious.CommanderManaReplacementEffect=debug
|
||||
|
||||
#console log
|
||||
#log4j.appender.console=org.apache.log4j.ConsoleAppender
|
||||
#log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
||||
#log4j.appender.console.layout.ConversionPattern=%-5p [%d{yyyy-MM-dd HH:mm [ss:SSS]}] %C{1}[%t]: %m%
|
||||
#log4j.appender.console.Threshold=info
|
||||
|
||||
#file log
|
||||
#log4j.appender.logfile=org.apache.log4j.FileAppender
|
||||
#log4j.appender.logfile.File=mageserver.log
|
||||
#log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
#log4j.appender.logfile.layout.ConversionPattern=%-5p [%d{yyyy-MM-dd HH:mm [ss:SSS]}] %C{1}[%t]: %m%n
|
||||
|
||||
log4j.appender.RollingAppender=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.RollingAppender.File=mageserver.log
|
||||
log4j.appender.RollingAppender.DatePattern='.'yyyy-MM-dd
|
||||
log4j.appender.RollingAppender.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.RollingAppender.layout.ConversionPattern=[%p] %d %c %M - %m%n
|
||||
log4j.appender.RollingAppender.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M%n
|
||||
#diagnostic log for game core classes
|
||||
#log4j.category.mage.server.game = INFO, diagfile
|
||||
#log4j.additivity.mage.server.game = false
|
||||
#log4j.appender.diagfile=org.apache.log4j.FileAppender
|
||||
#log4j.appender.diagfile.File=magediag.log
|
||||
#log4j.appender.diagfile.layout=org.apache.log4j.PatternLayout
|
||||
#log4j.appender.diagfile.layout.ConversionPattern=%-5p [%d{yyyy-MM-dd HH:mm [ss:SSS]}] %C{1}[%t]: %m%n
|
|
@ -1,5 +0,0 @@
|
|||
# Default global logging level.
|
||||
.level=FINER
|
||||
|
||||
# Set the default logging level for new ConsoleHandler instances
|
||||
java.util.logging.ConsoleHandler.level = ALL
|
|
@ -1,3 +0,0 @@
|
|||
grant {
|
||||
permission java.security.AllPermission;
|
||||
};
|
|
@ -1,15 +1,46 @@
|
|||
#default levels
|
||||
#SAMPLE SERVER CONFIG (you must enable it by command line)
|
||||
|
||||
#default log level and active appenders (dest for logs)
|
||||
log4j.rootLogger=info, console, logfile
|
||||
log4j.logger.com.j256.ormlite=warn
|
||||
log4j.logger.mage.player.ai=warn
|
||||
|
||||
#custom log level for java classes
|
||||
#log4j.logger.com.j256.ormlite=warn
|
||||
#log4j.logger.mage.player.ai=warn
|
||||
|
||||
#custom log file with diag info (only from special classes)
|
||||
#log4j.category.mage.server.game = INFO, diagfile
|
||||
#log4j.category.mage.server.tournament = INFO, diagfile
|
||||
#log4j.additivity.mage.server.game = false
|
||||
#log4j.additivity.mage.server.tournament = false
|
||||
#log4j.appender.diagfile=org.apache.log4j.FileAppender
|
||||
#log4j.appender.diagfile.File=magediag.log
|
||||
#log4j.appender.diagfile.layout=org.apache.log4j.PatternLayout
|
||||
#log4j.appender.diagfile.layout.ConversionPattern=%-5p [%d{yyyy-MM-dd HH:mm [ss:SSS]}] %C{1}[%t]: %m%n
|
||||
|
||||
#console log
|
||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.console.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M%n
|
||||
log4j.appender.console.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.console.Threshold=info
|
||||
|
||||
#file log
|
||||
#file log - without rolling
|
||||
log4j.appender.logfile=org.apache.log4j.FileAppender
|
||||
log4j.appender.logfile.File=mageserver.log
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfile.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M%n
|
||||
log4j.appender.logfile.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfile.File=mageserver.log
|
||||
|
||||
#file log - rolling by index
|
||||
log4j.appender.logfileByIndex=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.logfileByIndex.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfileByIndex.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfileByIndex.File=mageserver.log
|
||||
log4j.appender.logfileByIndex.MaxFileSize=10MB
|
||||
log4j.appender.logfileByIndex.MaxBackupIndex=5
|
||||
log4j.appender.logfileByIndex.append=true
|
||||
|
||||
#file log - rolling by dayly
|
||||
log4j.appender.logfileByDayly=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.logfileByDayly.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfileByDayly.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfileByDayly.File=mageserver.log
|
||||
log4j.appender.logfileByDayly.DatePattern='.'yyyy-MM-dd
|
|
@ -1,5 +0,0 @@
|
|||
# Default global logging level.
|
||||
.level=FINE
|
||||
|
||||
# Set the default logging level for new ConsoleHandler instances
|
||||
java.util.logging.ConsoleHandler.level = ALL
|
3
Mage.Server/release/config/readme.txt
Normal file
3
Mage.Server/release/config/readme.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
It's a sample config files. If you want to use it then run app with that extra commands (add it in launcher settings or in run script):
|
||||
-Dlog4j.configuration=file:./config/log4j.properties
|
||||
-Djava.security.policy=./config/security.policy
|
|
@ -4,5 +4,5 @@ set JAVA_HOME="C:\Program Files\Java\jre7\"
|
|||
set CLASSPATH=%JAVA_HOME%/bin;%CLASSPATH%
|
||||
set PATH=%JAVA_HOME%/bin;%PATH%
|
||||
:NOJAVADIR
|
||||
java -Xms256m -Xmx512m -XX:MaxPermSize=384m -Djava.security.policy=./config/security.policy -Djava.util.logging.config.file=./config/logging.config -Dlog4j.configuration=file:./config/log4j.properties -jar ./lib/mage-server-${project.version}.jar
|
||||
java -Xms256m -Xmx512m -XX:MaxPermSize=384m -Djava.security.policy=./config/security.policy -Dlog4j.configuration=file:./config/log4j.properties -jar ./lib/mage-server-${project.version}.jar
|
||||
pause
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
cd "`dirname "$0"`"
|
||||
|
||||
java -Xms256M -Xmx512M -XX:MaxPermSize=256m -Djava.security.policy=./config/security.policy -Djava.util.logging.config.file=./config/logging.config -Dlog4j.configuration=file:./config/log4j.properties -jar ./lib/mage-server-${project.version}.jar
|
||||
java -Xms256M -Xmx512M -XX:MaxPermSize=256m -Djava.security.policy=./config/security.policy -Dlog4j.configuration=file:./config/log4j.properties -jar ./lib/mage-server-${project.version}.jar
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
java -Xms256M -Xmx512M -XX:MaxPermSize=256m -Djava.security.policy=./config/security.policy -Djava.util.logging.config.file=./config/logging.config -Dlog4j.configuration=file:./config/log4j.properties -jar ./lib/mage-server-${project.version}.jar
|
||||
java -Xms256M -Xmx512M -XX:MaxPermSize=256m -Djava.security.policy=./config/security.policy -Dlog4j.configuration=file:./config/log4j.properties -jar ./lib/mage-server-${project.version}.jar
|
||||
|
|
|
@ -4,4 +4,4 @@ set JAVA_HOME="C:\Program Files (x86)\Java\jre7\"
|
|||
set CLASSPATH=%JAVA_HOME%/bin;%CLASSPATH%
|
||||
set PATH=%JAVA_HOME%/bin;%PATH%
|
||||
:NOJAVADIR
|
||||
java -Xms256M -Xmx512M -XX:MaxPermSize=384m -Djava.security.policy=./config/security.policy -Djava.util.logging.config.file=./config/logging.config -Dlog4j.configuration=file:./config/log4j.properties -jar ./lib/mage-server-${project.version}.jar
|
||||
java -Xms256M -Xmx512M -XX:MaxPermSize=384m -Djava.security.policy=./config/security.policy -Dlog4j.configuration=file:./config/log4j.properties -jar ./lib/mage-server-${project.version}.jar
|
|
@ -1,29 +1,13 @@
|
|||
#default levels
|
||||
#default settings (uses for SERVER run)
|
||||
|
||||
#default log level and active appenders (dest for logs)
|
||||
log4j.rootLogger=info, console, logfile
|
||||
|
||||
#custom log level for java classes
|
||||
log4j.logger.com.j256.ormlite=warn
|
||||
#log4j.logger.mage.player.ai=TRACE
|
||||
log4j.logger.mage.player.ai=warn
|
||||
#log4j.logger.mage.player.ai.ComputerPlayer6=debug
|
||||
#log4j.logger.mage.player.ai.ComputerPlayer7=debug
|
||||
#log4j.logger.mage.player.ai.GameStateEvaluator2=debug
|
||||
#log4j.logger.mage.player.human=DEBUG, console, logfile
|
||||
#log4j.additivity.mage.player.human=false
|
||||
log4j.logger.mage.server=debug
|
||||
|
||||
#console log
|
||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
||||
#log4j.appender.console.layout.ConversionPattern=%-5p [%d{yyyy-MM-dd HH:mm [ss:SSS]}] %C{1}[%t]: %m%n
|
||||
log4j.appender.console.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M%n
|
||||
log4j.appender.console.Threshold=DEBUG
|
||||
|
||||
#file log
|
||||
log4j.appender.logfile=org.apache.log4j.FileAppender
|
||||
log4j.appender.logfile.File=mageserver.log
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfile.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M%n
|
||||
|
||||
#diagnostic log for game core classes
|
||||
#custom log file with diag info (only from special classes)
|
||||
log4j.category.mage.server.game = INFO, diagfile
|
||||
log4j.category.mage.server.tournament = INFO, diagfile
|
||||
log4j.additivity.mage.server.game = false
|
||||
|
@ -32,3 +16,31 @@ log4j.appender.diagfile=org.apache.log4j.FileAppender
|
|||
log4j.appender.diagfile.File=magediag.log
|
||||
log4j.appender.diagfile.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.diagfile.layout.ConversionPattern=%-5p [%d{yyyy-MM-dd HH:mm [ss:SSS]}] %C{1}[%t]: %m%n
|
||||
|
||||
#console log
|
||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.console.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.console.Threshold=debug
|
||||
|
||||
#file log - without rolling
|
||||
log4j.appender.logfile=org.apache.log4j.FileAppender
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfile.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfile.File=mageserver.log
|
||||
|
||||
#file log - rolling by index
|
||||
log4j.appender.logfileByIndex=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.logfileByIndex.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfileByIndex.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfileByIndex.File=mageserver.log
|
||||
log4j.appender.logfileByIndex.MaxFileSize=10MB
|
||||
log4j.appender.logfileByIndex.MaxBackupIndex=5
|
||||
log4j.appender.logfileByIndex.append=true
|
||||
|
||||
#file log - rolling by dayly
|
||||
log4j.appender.logfileByDayly=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.logfileByDayly.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfileByDayly.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfileByDayly.File=mageserver.log
|
||||
log4j.appender.logfileByDayly.DatePattern='.'yyyy-MM-dd
|
|
@ -1,5 +0,0 @@
|
|||
# Default global logging level.
|
||||
.level=ALL
|
||||
|
||||
# Set the default logging level for new ConsoleHandler instances
|
||||
java.util.logging.ConsoleHandler.level = ALL
|
|
@ -19,8 +19,6 @@ import java.rmi.registry.LocateRegistry;
|
|||
import java.rmi.registry.Registry;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Base for starting Mage server. Controls interactions between MageAPI and Mage
|
||||
|
|
|
@ -1,25 +1,29 @@
|
|||
#default levels
|
||||
log4j.rootLogger=debug, console, file, watchdog
|
||||
#default settings (uses for TESTS run)
|
||||
|
||||
#default log level and active appenders (dest for logs)
|
||||
log4j.rootLogger=info, console, logfile, watchdog
|
||||
log4j.logger.com.j256.ormlite=warn
|
||||
|
||||
#custom log level for java classes
|
||||
#log4j.logger.com.j256.ormlite=warn
|
||||
#log4j.logger.mage.player.ai=warn
|
||||
|
||||
#console log
|
||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.console.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.console.layout.ConversionPattern=%-5p [%d{yyyy-MM-dd HH:mm [ss:SSS]}] %C{1}[%t]: %m%n
|
||||
log4j.appender.console.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.console.Threshold=info
|
||||
#log4j.appender.console.Threshold=debug
|
||||
|
||||
#file log - without rolling
|
||||
log4j.appender.logfile=org.apache.log4j.FileAppender
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfile.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n
|
||||
log4j.appender.logfile.File=magetest.log
|
||||
log4j.appender.logfile.Threshold=info
|
||||
|
||||
#file log
|
||||
log4j.appender.file=org.apache.log4j.FileAppender
|
||||
log4j.appender.file.file=Mage.log
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%-5p [%d{yyyy-MM-dd HH:mm [ss:SSS]}] %C{1}[%t]: %m%n
|
||||
log4j.appender.file.Threshold=INFO
|
||||
|
||||
#errors
|
||||
#file log - errors only
|
||||
log4j.appender.watchdog=org.apache.log4j.FileAppender
|
||||
log4j.appender.watchdog.file=watchdog.log
|
||||
log4j.appender.watchdog.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.watchdog.layout.ConversionPattern=%-5p [%d{yyyy-MM-dd HH:mm [ss:SSS]}] %C{1}[%t]: %m%n
|
||||
log4j.appender.watchdog.Threshold=ERROR
|
||||
log4j.appender.watchdog.file=magetestErrors.log
|
||||
log4j.appender.watchdog.Threshold=error
|
|
@ -1,7 +1,6 @@
|
|||
package mage.abilities.effects.common;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -25,8 +24,6 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
public class RollPlanarDieEffect extends OneShotEffect {
|
||||
|
||||
private static final Logger log = Logger.getLogger("Roll Planar Die");
|
||||
|
||||
protected List<Effect> chaosEffects = null;
|
||||
protected List<Target> chaosTargets = null;
|
||||
|
||||
|
|
Loading…
Reference in a new issue