Updated startup files.

This commit is contained in:
MobiusDev 2018-04-30 21:42:33 +00:00
parent d92c73b8cb
commit f699e2653c
33 changed files with 446 additions and 290 deletions

View File

@ -1,14 +1,14 @@
#!/bin/bash
DBHOST=localhost
USER=root
PASS=
DBNAME=l2jmobiusc6
# exit codes of GameServer:
# 0 normal shutdown
# 2 reboot attempt
err=1
until [ $err == 0 ];
do
java -Dfile.encoding=UTF-8 -Djava.util.logging.config.file=config/others/log.cfg -Xms2048m -Xmx4096m -cp ./libs/*:GameServer.jar com.l2jmobius.gameserver.GameServer > log/stdout.log 2>&1
err=$?
sleep 10
while :; do
[ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log"
[ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log"
java -Djava.util.logging.manager=com.l2jmobius.log.L2LogManager -Xms2048m -Xmx4096m -jar GameServer.jar > log/stdout.log 2>&1
[ $? -ne 2 ] && break
# /etc/init.d/mysql restart
sleep 10
done

View File

@ -1,104 +0,0 @@
############################################################
# Global properties
############################################################
# "handlers" specifies a comma separated list of log Handler
# classes. These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.
#handlers = java.util.logging.ConsoleHandler
# To also add the FileHandler, use the following line instead.
handlers = java.util.logging.FileHandler,java.util.logging.ConsoleHandler,\
com.l2jmobius.log.ErrorLogHandler
chat.handlers = com.l2jmobius.log.ChatLogHandler
chat.useParentHandlers = false
gmaudit.handlers = com.l2jmobius.log.GMAuditLogHandler
gmaudit.useParentHandlers = false
item.handlers = com.l2jmobius.log.ItemLogHandler
item.useParentHandlers = false
audit.handlers = com.l2jmobius.log.AuditLogHandler
audit.useParentHandlers = false
# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level
# can be overriden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
.level = CONFIG
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = log/java%u.log
java.util.logging.FileHandler.limit = 500000
java.util.logging.FileHandler.count = 5
java.util.logging.FileHandler.formatter = com.l2jmobius.log.FileLogFormatter
java.util.logging.FileHandler.level = CONFIG
# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = FINER
java.util.logging.ConsoleHandler.formatter = com.l2jmobius.log.ConsoleLogFormatter
# log errors (exceptions)
com.l2jmobius.log.ErrorLogHandler.pattern = log/error%u.log
com.l2jmobius.log.ErrorLogHandler.count = 5
com.l2jmobius.log.ErrorLogHandler.formatter = java.util.logging.SimpleFormatter
com.l2jmobius.log.ErrorLogHandler.filter = com.l2jmobius.log.ErrorFilter
com.l2jmobius.log.ErrorLogHandler.level = CONFIG
# log chats
com.l2jmobius.log.ChatLogHandler.pattern = log/chat.log
com.l2jmobius.log.ChatLogHandler.formatter = com.l2jmobius.log.ChatLogFormatter
com.l2jmobius.log.ChatLogHandler.filter = com.l2jmobius.log.ChatFilter
com.l2jmobius.log.ChatLogHandler.append = true
com.l2jmobius.log.ChatLogHandler.level = INFO
# log GM Audit
com.l2jmobius.log.GMAuditLogHandler.pattern = log/gmaudit.log
com.l2jmobius.log.GMAuditLogHandler.formatter = com.l2jmobius.log.GMAuditFormatter
com.l2jmobius.log.GMAuditLogHandler.filter = com.l2jmobius.log.GMAuditFilter
com.l2jmobius.log.GMAuditLogHandler.append = true
com.l2jmobius.log.GMAuditLogHandler.level = INFO
# log items
com.l2jmobius.log.ItemLogHandler.pattern = log/item.log
com.l2jmobius.log.ItemLogHandler.formatter = com.l2jmobius.log.ItemLogFormatter
com.l2jmobius.log.ItemLogHandler.filter = com.l2jmobius.log.ItemFilter
com.l2jmobius.log.ItemLogHandler.append = true
com.l2jmobius.log.ItemLogHandler.level = INFO
# audit
com.l2jmobius.log.AuditLogHandler.pattern = log/audit.log
com.l2jmobius.log.AuditLogHandler.formatter = com.l2jmobius.log.AuditFormatter
com.l2jmobius.log.AuditLogHandler.filter = com.l2jmobius.log.AuditFilter
com.l2jmobius.log.AuditLogHandler.append = true
com.l2jmobius.log.AuditLogHandler.level = INFO
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
com.l2jmobius.gameserver.level = CONFIG
com.l2jmobius.loginserver.level = CONFIG
com.l2jmobius.gameserver.Connection.level = CONFIG
com.l2jmobius.gameserver.serverpackets.level = FINER
com.l2jmobius.gameserver.clientpackets.level = FINER
com.l2jmobius.gameserver.model.L2Character.level = FINER
com.l2jmobius.gameserver.skills.SkillsEngine.level = WARNING
# Alt Privileges Administration
AltPrivilegesAdmin.pattern = log/admin-commands.log
AltPrivilegesAdmin.formatter = com.l2jmobius.log.FileLogFormatter
AltPrivilegesAdmin.append = true
AltPrivilegesAdmin.level = CONFIG

View File

@ -0,0 +1,7 @@
# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level
# can be overriden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
.level=OFF

View File

@ -0,0 +1,162 @@
############################################################
# Global properties
############################################################
# "handlers" specifies a comma separated list of log Handler
# classes. These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.
#handlers= java.util.logging.ConsoleHandler
# To also add the FileHandler, use the following line instead.
handlers = java.util.logging.FileHandler,\
java.util.logging.ConsoleHandler,\
com.l2jmobius.log.handler.ErrorLogHandler
chat.handlers = com.l2jmobius.log.handler.ChatLogHandler
chat.useParentHandlers = false
gmaudit.handlers = com.l2jmobius.log.handler.GMAuditLogHandler
gmaudit.useParentHandlers = false
item.handlers = com.l2jmobius.log.handler.ItemLogHandler
item.useParentHandlers = false
audit.handlers = com.l2jmobius.log.handler.AuditLogHandler
audit.useParentHandlers = false
enchant.handlers = com.l2jmobius.log.handler.EnchantItemLogHandler,\
com.l2jmobius.log.handler.EnchantSkillLogHandler
enchant.useParentHandlers = false
olympiad.handlers = com.l2jmobius.log.handler.OlympiadLogHandler
olympiad.useParentHandlers = false
damage.handlers = com.l2jmobius.log.handler.AllDamageLogHandler,\
com.l2jmobius.log.handler.PDamageLogHandler,\
com.l2jmobius.log.handler.MDamageLogHandler
damage.useParentHandlers = false
accounting.handlers = com.l2jmobius.log.handler.AccountingLogHandler
accounting.useParentHandlers = false
# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level
# can be overriden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
.level= CONFIG
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = log/java%g.log
java.util.logging.FileHandler.count = 20
java.util.logging.FileHandler.limit = 0
java.util.logging.FileHandler.formatter = com.l2jmobius.log.formatter.FileLogFormatter
java.util.logging.FileHandler.level = CONFIG
# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = FINER
java.util.logging.ConsoleHandler.formatter = com.l2jmobius.log.formatter.ConsoleLogFormatter
# log errors (exceptions)
com.l2jmobius.log.handler.ErrorLogHandler.pattern = log/error%g.log
com.l2jmobius.log.handler.ErrorLogHandler.count = 20
com.l2jmobius.log.handler.ErrorLogHandler.limit = 0
com.l2jmobius.log.handler.ErrorLogHandler.formatter = java.util.logging.SimpleFormatter
com.l2jmobius.log.handler.ErrorLogHandler.filter = com.l2jmobius.log.filter.ErrorFilter
com.l2jmobius.log.handler.ErrorLogHandler.level = CONFIG
# log chats
com.l2jmobius.log.handler.ChatLogHandler.pattern = log/chat.log
com.l2jmobius.log.handler.ChatLogHandler.formatter = com.l2jmobius.log.formatter.ChatLogFormatter
com.l2jmobius.log.handler.ChatLogHandler.filter = com.l2jmobius.log.filter.ChatFilter
com.l2jmobius.log.handler.ChatLogHandler.append = true
com.l2jmobius.log.handler.ChatLogHandler.level = INFO
# log GM Audit
com.l2jmobius.log.handler.GMAuditLogHandler.pattern = log/gmaudit.log
com.l2jmobius.log.handler.GMAuditLogHandler.formatter = com.l2jmobius.log.formatter.GMAuditFormatter
com.l2jmobius.log.handler.GMAuditLogHandler.filter = com.l2jmobius.log.filter.GMAuditFilter
com.l2jmobius.log.handler.GMAuditLogHandler.append = true
com.l2jmobius.log.handler.GMAuditLogHandler.level = INFO
# log items
com.l2jmobius.log.handler.ItemLogHandler.pattern = log/item.log
com.l2jmobius.log.handler.ItemLogHandler.formatter = com.l2jmobius.log.formatter.ItemLogFormatter
com.l2jmobius.log.handler.ItemLogHandler.filter = com.l2jmobius.log.filter.ItemFilter
com.l2jmobius.log.handler.ItemLogHandler.append = true
com.l2jmobius.log.handler.ItemLogHandler.level = INFO
# audit
com.l2jmobius.log.handler.AuditLogHandler.pattern = log/audit.log
com.l2jmobius.log.handler.AuditLogHandler.formatter = com.l2jmobius.log.formatter.AuditFormatter
com.l2jmobius.log.handler.AuditLogHandler.filter = com.l2jmobius.log.filter.AuditFilter
com.l2jmobius.log.handler.AuditLogHandler.append = true
com.l2jmobius.log.handler.AuditLogHandler.level = INFO
# enchant item log
com.l2jmobius.log.handler.EnchantItemLogHandler.pattern = log/enchantitem.log
com.l2jmobius.log.handler.EnchantItemLogHandler.formatter = com.l2jmobius.log.formatter.EnchantFormatter
com.l2jmobius.log.handler.EnchantItemLogHandler.filter = com.l2jmobius.log.filter.EnchantItemFilter
com.l2jmobius.log.handler.EnchantItemLogHandler.append = true
com.l2jmobius.log.handler.EnchantItemLogHandler.level = INFO
# enchant skill log
com.l2jmobius.log.handler.EnchantSkillLogHandler.pattern = log/enchantskill.log
com.l2jmobius.log.handler.EnchantSkillLogHandler.formatter = com.l2jmobius.log.formatter.EnchantFormatter
com.l2jmobius.log.handler.EnchantSkillLogHandler.filter = com.l2jmobius.log.filter.EnchantSkillFilter
com.l2jmobius.log.handler.EnchantSkillLogHandler.append = true
com.l2jmobius.log.handler.EnchantSkillLogHandler.level = INFO
# olympiad log
com.l2jmobius.log.handler.OlympiadLogHandler.pattern = log/olympiad.csv
com.l2jmobius.log.handler.OlympiadLogHandler.formatter = com.l2jmobius.log.formatter.OlympiadFormatter
com.l2jmobius.log.handler.OlympiadLogHandler.append = true
com.l2jmobius.log.handler.OlympiadLogHandler.level = INFO
# damage logs
com.l2jmobius.log.handler.AllDamageLogHandler.pattern = log/game/_all.txt
com.l2jmobius.log.handler.AllDamageLogHandler.formatter = com.l2jmobius.log.formatter.DamageFormatter
com.l2jmobius.log.handler.AllDamageLogHandler.append = true
com.l2jmobius.log.handler.AllDamageLogHandler.level = INFO
com.l2jmobius.log.handler.PDamageLogHandler.pattern = log/game/damage_pdam.txt
com.l2jmobius.log.handler.PDamageLogHandler.formatter = com.l2jmobius.log.formatter.DamageFormatter
com.l2jmobius.log.handler.PDamageLogHandler.filter = com.l2jmobius.log.filter.PDamageFilter
com.l2jmobius.log.handler.PDamageLogHandler.append = true
com.l2jmobius.log.handler.PDamageLogHandler.level = INFO
com.l2jmobius.log.handler.MDamageLogHandler.pattern = log/game/damage_mdam.txt
com.l2jmobius.log.handler.MDamageLogHandler.formatter = com.l2jmobius.log.formatter.DamageFormatter
com.l2jmobius.log.handler.MDamageLogHandler.filter = com.l2jmobius.log.filter.MDamageFilter
com.l2jmobius.log.handler.MDamageLogHandler.append = true
com.l2jmobius.log.handler.MDamageLogHandler.level = INFO
# accounting
com.l2jmobius.log.handler.AccountingLogHandler.pattern = log/accounting.log
com.l2jmobius.log.handler.AccountingLogHandler.formatter = com.l2jmobius.log.formatter.AccountingFormatter
com.l2jmobius.log.handler.AccountingLogHandler.append = true
com.l2jmobius.log.handler.AccountingLogHandler.level = CONFIG
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
com.l2jmobius.gameserver.level = CONFIG
com.l2jmobius.loginserver.level = CONFIG
#com.l2jmobius.gameserver.Connection.level = CONFIG
com.l2jmobius.gameserver.network.serverpackets.level = FINER
com.l2jmobius.gameserver.network.clientpackets.level = FINER
com.l2jmobius.gameserver.model.actor.L2Character.level = FINER
com.l2jmobius.gameserver.engines.DocumentEngine.level = INFO
# Alt Privileges Administration
AltPrivilegesAdmin.pattern = log/admin-commands.log
AltPrivilegesAdmin.formatter = com.l2jmobius.log.formatter.FileLogFormatter
AltPrivilegesAdmin.append = true
AltPrivilegesAdmin.level = CONFIG
# c3p0 Logging
com.mchange.v2.level = WARNING

View File

@ -5,52 +5,33 @@ title L2J Mobius - Game Server Console
echo Starting Game Server.
echo.
java -version:1.8 -server -Dfile.encoding=UTF-8 -Djava.util.logging.config.file=config/others/log.cfg -XX:+AggressiveOpts -Xnoclassgc -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:SurvivorRatio=8 -Xmx4g -Xms2g -Xmn1g -cp ./libs/*;Gameserver.jar com.l2jmobius.gameserver.GameServer
REM java -Djava.util.logging.manager=com.l2jmobius.log.L2LogManager -Dpython.cachedir=../cachedir -Xms1024m -Xmx1536m -jar GameServer.jar
java -version:1.8 -server -Dfile.encoding=UTF-8 -Djava.util.logging.manager=com.l2jmobius.log.L2LogManager -XX:+AggressiveOpts -Xnoclassgc -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:SurvivorRatio=8 -Xmx4g -Xms2g -Xmn1g -jar GameServer.jar
REM NOTE: If you have a powerful machine, you could modify/add some extra parameters for performance, like:
REM -Xms1536m
REM -Xmx3072m
REM -XX:+AggressiveOpts
REM Use this parameters carefully, some of them could cause abnormal behavior, deadlocks, etc.
REM More info here: http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
if ERRORLEVEL 7 goto telldown
if ERRORLEVEL 6 goto tellrestart
if ERRORLEVEL 5 goto taskrestart
if ERRORLEVEL 4 goto taskdown
REM 3 - abort
if ERRORLEVEL 2 goto restart
if ERRORLEVEL 1 goto error
goto end
:tellrestart
echo.
echo Telnet server Restart ...
echo.
goto start
:taskrestart
echo.
echo Auto Task Restart ...
echo.
goto start
:restart
echo.
echo Admin Restart ...
echo Admin Restarted Game Server.
echo.
goto start
:taskdown
echo .
echo Server terminated (Auto task)
echo .
:telldown
echo .
echo Server terminated (Telnet)
echo .
:error
echo.
echo Server terminated abnormally
echo Game Server Terminated Abnormally!
echo.
:end
echo.
echo server terminated
echo Game Server Terminated.
echo.
:question
set choix=q
set /p choix=Restart(r) or Quit(q)
if /i %choix%==r goto start
if /i %choix%==q goto exit
:exit
exit
pause
pause

View File

@ -0,0 +1,3 @@
#! /bin/sh
./GameServer_loop.sh &

View File

@ -3,8 +3,9 @@
err=1
until [ $err == 0 ];
do
java -Dfile.encoding=UTF-8 -Djava.util.logging.config.file=config/others/log.cfg -Xms128m -Xmx128m -cp lib/*:LoginServer.jar com.l2jmobius.loginserver.LoginServer > log/stdout.log 2>&1
[ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log"
[ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log"
java -Xms128m -Xmx256m -jar LoginServer.jar > log/stdout.log 2>&1
err=$?
# /etc/init.d/mysql restart
sleep 10;
done

View File

@ -1,2 +1,5 @@
@java -Dfile.encoding=UTF-8 -Djava.util.logging.config.file=config/others/log.cfg -cp lib/*;LoginServer.jar com.l2jmobius.tools.gsregistering.GameServerRegister
@pause
@echo off
title Register Game Server
color 17
java -version:1.8 -Djava.util.logging.config.file=console.cfg -cp ./../libs/*;LoginServer.jar com.l2jmobius.tools.gsregistering.BaseGameServerRegister -c
pause

View File

@ -1,2 +1,2 @@
#!/bin/sh
java -Dfile.encoding=UTF-8 -Djava.util.logging.config.file=config/others/log.cfg -cp lib/*:lib/LoginServer.jar com.l2jmobius.tools.gsregistering.GameServerRegister
java -Djava.util.logging.config.file=console.cfg -cp ./../libs/*:LoginServer.jar com.l2jmobius.tools.gsregistering.GameServerRegister -c

View File

@ -1,104 +0,0 @@
############################################################
# Global properties
############################################################
# "handlers" specifies a comma separated list of log Handler
# classes. These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.
#handlers = java.util.logging.ConsoleHandler
# To also add the FileHandler, use the following line instead.
handlers = java.util.logging.FileHandler,java.util.logging.ConsoleHandler,\
com.l2jmobius.log.ErrorLogHandler
chat.handlers = com.l2jmobius.log.ChatLogHandler
chat.useParentHandlers = false
gmaudit.handlers = com.l2jmobius.log.GMAuditLogHandler
gmaudit.useParentHandlers = false
item.handlers = com.l2jmobius.log.ItemLogHandler
item.useParentHandlers = false
audit.handlers = com.l2jmobius.log.AuditLogHandler
audit.useParentHandlers = false
# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level
# can be overriden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
.level = CONFIG
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = log/java%u.log
java.util.logging.FileHandler.limit = 500000
java.util.logging.FileHandler.count = 5
java.util.logging.FileHandler.formatter = com.l2jmobius.log.FileLogFormatter
java.util.logging.FileHandler.level = CONFIG
# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = FINER
java.util.logging.ConsoleHandler.formatter = com.l2jmobius.log.ConsoleLogFormatter
# log errors (exceptions)
com.l2jmobius.log.ErrorLogHandler.pattern = log/error%u.log
com.l2jmobius.log.ErrorLogHandler.count = 5
com.l2jmobius.log.ErrorLogHandler.formatter = java.util.logging.SimpleFormatter
com.l2jmobius.log.ErrorLogHandler.filter = com.l2jmobius.log.ErrorFilter
com.l2jmobius.log.ErrorLogHandler.level = CONFIG
# log chats
com.l2jmobius.log.ChatLogHandler.pattern = log/chat.log
com.l2jmobius.log.ChatLogHandler.formatter = com.l2jmobius.log.ChatLogFormatter
com.l2jmobius.log.ChatLogHandler.filter = com.l2jmobius.log.ChatFilter
com.l2jmobius.log.ChatLogHandler.append = true
com.l2jmobius.log.ChatLogHandler.level = INFO
# log GM Audit
com.l2jmobius.log.GMAuditLogHandler.pattern = log/gmaudit.log
com.l2jmobius.log.GMAuditLogHandler.formatter = com.l2jmobius.log.GMAuditFormatter
com.l2jmobius.log.GMAuditLogHandler.filter = com.l2jmobius.log.GMAuditFilter
com.l2jmobius.log.GMAuditLogHandler.append = true
com.l2jmobius.log.GMAuditLogHandler.level = INFO
# log items
com.l2jmobius.log.ItemLogHandler.pattern = log/item.log
com.l2jmobius.log.ItemLogHandler.formatter = com.l2jmobius.log.ItemLogFormatter
com.l2jmobius.log.ItemLogHandler.filter = com.l2jmobius.log.ItemFilter
com.l2jmobius.log.ItemLogHandler.append = true
com.l2jmobius.log.ItemLogHandler.level = INFO
# audit
com.l2jmobius.log.AuditLogHandler.pattern = log/audit.log
com.l2jmobius.log.AuditLogHandler.formatter = com.l2jmobius.log.AuditFormatter
com.l2jmobius.log.AuditLogHandler.filter = com.l2jmobius.log.AuditFilter
com.l2jmobius.log.AuditLogHandler.append = true
com.l2jmobius.log.AuditLogHandler.level = INFO
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
com.l2jmobius.gameserver.level = CONFIG
com.l2jmobius.loginserver.level = CONFIG
com.l2jmobius.gameserver.Connection.level = CONFIG
com.l2jmobius.gameserver.serverpackets.level = FINER
com.l2jmobius.gameserver.clientpackets.level = FINER
com.l2jmobius.gameserver.model.L2Character.level = FINER
com.l2jmobius.gameserver.skills.SkillsEngine.level = WARNING
# Alt Privileges Administration
AltPrivilegesAdmin.pattern = log/admin-commands.log
AltPrivilegesAdmin.formatter = com.l2jmobius.log.FileLogFormatter
AltPrivilegesAdmin.append = true
AltPrivilegesAdmin.level = CONFIG

View File

@ -0,0 +1,7 @@
# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level
# can be overriden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
.level=OFF

View File

@ -0,0 +1,162 @@
############################################################
# Global properties
############################################################
# "handlers" specifies a comma separated list of log Handler
# classes. These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.
#handlers= java.util.logging.ConsoleHandler
# To also add the FileHandler, use the following line instead.
handlers = java.util.logging.FileHandler,\
java.util.logging.ConsoleHandler,\
com.l2jmobius.log.handler.ErrorLogHandler
chat.handlers = com.l2jmobius.log.handler.ChatLogHandler
chat.useParentHandlers = false
gmaudit.handlers = com.l2jmobius.log.handler.GMAuditLogHandler
gmaudit.useParentHandlers = false
item.handlers = com.l2jmobius.log.handler.ItemLogHandler
item.useParentHandlers = false
audit.handlers = com.l2jmobius.log.handler.AuditLogHandler
audit.useParentHandlers = false
enchant.handlers = com.l2jmobius.log.handler.EnchantItemLogHandler,\
com.l2jmobius.log.handler.EnchantSkillLogHandler
enchant.useParentHandlers = false
olympiad.handlers = com.l2jmobius.log.handler.OlympiadLogHandler
olympiad.useParentHandlers = false
damage.handlers = com.l2jmobius.log.handler.AllDamageLogHandler,\
com.l2jmobius.log.handler.PDamageLogHandler,\
com.l2jmobius.log.handler.MDamageLogHandler
damage.useParentHandlers = false
accounting.handlers = com.l2jmobius.log.handler.AccountingLogHandler
accounting.useParentHandlers = false
# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level
# can be overriden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
.level= CONFIG
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = log/java%g.log
java.util.logging.FileHandler.count = 20
java.util.logging.FileHandler.limit = 0
java.util.logging.FileHandler.formatter = com.l2jmobius.log.formatter.FileLogFormatter
java.util.logging.FileHandler.level = CONFIG
# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = FINER
java.util.logging.ConsoleHandler.formatter = com.l2jmobius.log.formatter.ConsoleLogFormatter
# log errors (exceptions)
com.l2jmobius.log.handler.ErrorLogHandler.pattern = log/error%g.log
com.l2jmobius.log.handler.ErrorLogHandler.count = 20
com.l2jmobius.log.handler.ErrorLogHandler.limit = 0
com.l2jmobius.log.handler.ErrorLogHandler.formatter = java.util.logging.SimpleFormatter
com.l2jmobius.log.handler.ErrorLogHandler.filter = com.l2jmobius.log.filter.ErrorFilter
com.l2jmobius.log.handler.ErrorLogHandler.level = CONFIG
# log chats
com.l2jmobius.log.handler.ChatLogHandler.pattern = log/chat.log
com.l2jmobius.log.handler.ChatLogHandler.formatter = com.l2jmobius.log.formatter.ChatLogFormatter
com.l2jmobius.log.handler.ChatLogHandler.filter = com.l2jmobius.log.filter.ChatFilter
com.l2jmobius.log.handler.ChatLogHandler.append = true
com.l2jmobius.log.handler.ChatLogHandler.level = INFO
# log GM Audit
com.l2jmobius.log.handler.GMAuditLogHandler.pattern = log/gmaudit.log
com.l2jmobius.log.handler.GMAuditLogHandler.formatter = com.l2jmobius.log.formatter.GMAuditFormatter
com.l2jmobius.log.handler.GMAuditLogHandler.filter = com.l2jmobius.log.filter.GMAuditFilter
com.l2jmobius.log.handler.GMAuditLogHandler.append = true
com.l2jmobius.log.handler.GMAuditLogHandler.level = INFO
# log items
com.l2jmobius.log.handler.ItemLogHandler.pattern = log/item.log
com.l2jmobius.log.handler.ItemLogHandler.formatter = com.l2jmobius.log.formatter.ItemLogFormatter
com.l2jmobius.log.handler.ItemLogHandler.filter = com.l2jmobius.log.filter.ItemFilter
com.l2jmobius.log.handler.ItemLogHandler.append = true
com.l2jmobius.log.handler.ItemLogHandler.level = INFO
# audit
com.l2jmobius.log.handler.AuditLogHandler.pattern = log/audit.log
com.l2jmobius.log.handler.AuditLogHandler.formatter = com.l2jmobius.log.formatter.AuditFormatter
com.l2jmobius.log.handler.AuditLogHandler.filter = com.l2jmobius.log.filter.AuditFilter
com.l2jmobius.log.handler.AuditLogHandler.append = true
com.l2jmobius.log.handler.AuditLogHandler.level = INFO
# enchant item log
com.l2jmobius.log.handler.EnchantItemLogHandler.pattern = log/enchantitem.log
com.l2jmobius.log.handler.EnchantItemLogHandler.formatter = com.l2jmobius.log.formatter.EnchantFormatter
com.l2jmobius.log.handler.EnchantItemLogHandler.filter = com.l2jmobius.log.filter.EnchantItemFilter
com.l2jmobius.log.handler.EnchantItemLogHandler.append = true
com.l2jmobius.log.handler.EnchantItemLogHandler.level = INFO
# enchant skill log
com.l2jmobius.log.handler.EnchantSkillLogHandler.pattern = log/enchantskill.log
com.l2jmobius.log.handler.EnchantSkillLogHandler.formatter = com.l2jmobius.log.formatter.EnchantFormatter
com.l2jmobius.log.handler.EnchantSkillLogHandler.filter = com.l2jmobius.log.filter.EnchantSkillFilter
com.l2jmobius.log.handler.EnchantSkillLogHandler.append = true
com.l2jmobius.log.handler.EnchantSkillLogHandler.level = INFO
# olympiad log
com.l2jmobius.log.handler.OlympiadLogHandler.pattern = log/olympiad.csv
com.l2jmobius.log.handler.OlympiadLogHandler.formatter = com.l2jmobius.log.formatter.OlympiadFormatter
com.l2jmobius.log.handler.OlympiadLogHandler.append = true
com.l2jmobius.log.handler.OlympiadLogHandler.level = INFO
# damage logs
com.l2jmobius.log.handler.AllDamageLogHandler.pattern = log/game/_all.txt
com.l2jmobius.log.handler.AllDamageLogHandler.formatter = com.l2jmobius.log.formatter.DamageFormatter
com.l2jmobius.log.handler.AllDamageLogHandler.append = true
com.l2jmobius.log.handler.AllDamageLogHandler.level = INFO
com.l2jmobius.log.handler.PDamageLogHandler.pattern = log/game/damage_pdam.txt
com.l2jmobius.log.handler.PDamageLogHandler.formatter = com.l2jmobius.log.formatter.DamageFormatter
com.l2jmobius.log.handler.PDamageLogHandler.filter = com.l2jmobius.log.filter.PDamageFilter
com.l2jmobius.log.handler.PDamageLogHandler.append = true
com.l2jmobius.log.handler.PDamageLogHandler.level = INFO
com.l2jmobius.log.handler.MDamageLogHandler.pattern = log/game/damage_mdam.txt
com.l2jmobius.log.handler.MDamageLogHandler.formatter = com.l2jmobius.log.formatter.DamageFormatter
com.l2jmobius.log.handler.MDamageLogHandler.filter = com.l2jmobius.log.filter.MDamageFilter
com.l2jmobius.log.handler.MDamageLogHandler.append = true
com.l2jmobius.log.handler.MDamageLogHandler.level = INFO
# accounting
com.l2jmobius.log.handler.AccountingLogHandler.pattern = log/accounting.log
com.l2jmobius.log.handler.AccountingLogHandler.formatter = com.l2jmobius.log.formatter.AccountingFormatter
com.l2jmobius.log.handler.AccountingLogHandler.append = true
com.l2jmobius.log.handler.AccountingLogHandler.level = CONFIG
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
com.l2jmobius.gameserver.level = CONFIG
com.l2jmobius.loginserver.level = CONFIG
#com.l2jmobius.gameserver.Connection.level = CONFIG
com.l2jmobius.gameserver.network.serverpackets.level = FINER
com.l2jmobius.gameserver.network.clientpackets.level = FINER
com.l2jmobius.gameserver.model.actor.L2Character.level = FINER
com.l2jmobius.gameserver.engines.DocumentEngine.level = INFO
# Alt Privileges Administration
AltPrivilegesAdmin.pattern = log/admin-commands.log
AltPrivilegesAdmin.formatter = com.l2jmobius.log.formatter.FileLogFormatter
AltPrivilegesAdmin.append = true
AltPrivilegesAdmin.level = CONFIG
# c3p0 Logging
com.mchange.v2.level = WARNING

View File

@ -5,32 +5,26 @@ title L2J Mobius - Login Server Console
echo Starting Login Server.
echo.
java -version:1.8 -server -Dfile.encoding=UTF-8 -Djava.util.logging.config.file=config/others/log.cfg -Xms128m -Xmx256m -cp ./lib/*;LoginServer.jar com.l2jmobius.loginserver.LoginServer
REM java -Xms128m -Xmx256m -jar LoginServer.jar
java -version:1.8 -server -Xms128m -Xmx256m -jar LoginServer.jar
if ERRORLEVEL 2 goto restart
if ERRORLEVEL 1 goto error
goto end
:restart
echo.
echo Admin Restarted ...
ping -n 5 localhost > nul
echo Admin Restarted Login Server.
echo.
goto start
:error
echo.
echo LoginServer terminated abnormaly
ping -n 5 localhost > nul
echo Login Server terminated abnormally!
echo.
goto start
:end
echo.
echo LoginServer terminated
echo Login Server Terminated.
echo.
:question
set choix=q
set /p choix=Restart(r) or Quit(q)
if /i %choix%==r goto start
if /i %choix%==q goto exit
:exit
exit
pause

View File

@ -0,0 +1,3 @@
#!/bin/bash
./LoginServer_loop.sh &

View File

@ -1,7 +1,7 @@
@echo off
title SQL Account Manager
color 17
java -version:1.8 -Dfile.encoding=UTF-8 -Djava.util.logging.config.file=config/others/log.cfg -cp ./../libs/*;LoginServer.jar com.l2jmobius.tools.accountmanager.SQLAccountManager
java -version:1.8 -Djava.util.logging.config.file=console.cfg -cp ./../libs/*;LoginServer.jar com.l2jmobius.tools.accountmanager.SQLAccountManager
if %errorlevel% == 0 (
echo.
echo Execution successful

View File

@ -1,2 +1,2 @@
#!/bin/sh
java -Dfile.encoding=UTF-8 -Djava.util.logging.config.file=config/others/log.cfg -cp ./../libs/*:LoginServer.jar com.l2jmobius.tools.accountmanager.SQLAccountManager
java -Djava.util.logging.config.file=console.cfg -cp ./../libs/*:LoginServer.jar com.l2jmobius.tools.accountmanager.SQLAccountManager

View File

@ -149,7 +149,7 @@ public class GameServer
// Local Constants
private static final String LOG_FOLDER = "log"; // Name of folder for log file
private static final String LOG_NAME = "./config/others/log.cfg"; // Name of log file
private static final String LOG_NAME = "./log.cfg"; // Name of log file
private static SelectorThread<L2GameClient> _selectorThread;
private static LoginServerThread _loginThread;

View File

@ -0,0 +1,41 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
import java.util.logging.LogManager;
/**
* Specialized {@link LogManager} class.<br>
* Prevents log devices to close before shutdown sequence so the shutdown sequence can make logging.
*/
public class L2LogManager extends LogManager
{
public L2LogManager()
{
}
@Override
public void reset()
{
// do nothing
}
public void doReset()
{
super.reset();
}
}

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.filter;
import java.util.logging.Filter;
import java.util.logging.LogRecord;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.filter;
import java.util.logging.Filter;
import java.util.logging.LogRecord;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.filter;
import java.util.logging.Filter;
import java.util.logging.LogRecord;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.filter;
import java.util.logging.Filter;
import java.util.logging.LogRecord;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.formatter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.formatter;
import java.util.logging.LogRecord;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.formatter;
import java.util.logging.LogRecord;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.formatter;
import java.util.logging.LogRecord;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.formatter;
import java.text.SimpleDateFormat;
import java.util.Date;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.formatter;
import java.util.logging.LogRecord;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.handler;
import java.io.IOException;
import java.util.logging.FileHandler;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.handler;
import java.io.IOException;
import java.util.logging.FileHandler;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.handler;
import java.io.IOException;
import java.util.logging.FileHandler;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.log;
package com.l2jmobius.log.handler;
import java.io.IOException;
import java.util.logging.FileHandler;

View File

@ -63,7 +63,7 @@ public class LoginServer
Server.serverMode = Server.MODE_LOGINSERVER;
// Local Constants
final String LOG_FOLDER = "log"; // Name of folder for log file
final String LOG_NAME = "./config/others/log.cfg"; // Name of log file
final String LOG_NAME = "./log.cfg"; // Name of log file
/*** Main ***/
// Create log folder