1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-05 23:22:47 +00:00

Implements logging service configuration

This commit is contained in:
2011-12-29 00:14:04 -02:00
parent 1f100326ba
commit 7740e37cf8
7 changed files with 125 additions and 41 deletions

View File

@@ -47,14 +47,19 @@
you normally don't need to change anything here nor in the firewall. -->
<server listen="0.0.0.0:7777" />
</service>
<!-- Logging service -->
<service interface="com.l2jserver.service.core.LoggingService"
implementation="com.l2jserver.service.core.Log4JLoggingService">
<logger name="" level="ERROR" />
<logger name="com.l2jserver" level="INFO" />
</service>
<!-- ###################################################################### -->
<!-- ########################### CORE SERVICES ############################ -->
<!-- ###################################################################### -->
<!-- Those services provide basic core features and are required for server
startup process -->
<service interface="com.l2jserver.service.core.LoggingService"
implementation="com.l2jserver.service.core.Log4JLoggingService" />
<service interface="com.l2jserver.service.core.threading.ThreadService"
implementation="com.l2jserver.service.core.threading.ThreadServiceImpl" />
<service interface="com.l2jserver.service.configuration.ConfigurationService"

View File

@@ -58,14 +58,24 @@
you normally don't need to change anything here nor in the firewall. -->
<server listen="0.0.0.0:7777" />
</service>
<!-- Logging service -->
<service interface="com.l2jserver.service.core.LoggingService"
implementation="com.l2jserver.service.core.Log4JLoggingService">
<logger name="" level="ERROR" />
<logger name="com.l2jserver" level="INFO" />
<logger name="com.l2jserver.service.game.template.XMLTemplateService" level="INFO" />
<logger name="com.l2jserver.service.cache" level="INFO" />
<logger name="com.l2jserver.service.database.sql.AbstractSQLDatabaseService" level="INFO" />
<logger name="com.l2jserver.service.game.world.CachedWorldIDService" level="INFO" />
<logger name="com.l2jserver.model.id.object.allocator.BitSetIDAllocator" level="INFO" />
</service>
<!-- ###################################################################### -->
<!-- ########################### CORE SERVICES ############################ -->
<!-- ###################################################################### -->
<!-- Those services provide basic core features and are required for server
startup process -->
<service interface="com.l2jserver.service.core.LoggingService"
implementation="com.l2jserver.service.core.Log4JLoggingService" />
<service interface="com.l2jserver.service.core.threading.ThreadService"
implementation="com.l2jserver.service.core.threading.ThreadServiceImpl" />
<service interface="com.l2jserver.service.configuration.ConfigurationService"

View File

@@ -21,6 +21,7 @@ import java.nio.file.Paths;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.log4j.BasicConfigurator;
import org.w3c.dom.DOMException;
import org.xml.sax.SAXException;
@@ -77,6 +78,8 @@ public class L2JGameServerMain {
*/
@SuppressWarnings("unchecked")
public static void main(String[] args) {
BasicConfigurator.configure();
final ServiceManager serviceManager = new ServiceManager();
try {
serviceManager.load(Paths.get("services.xml"));