Jump to content
  • 0

Chat log not being created


Question

Posted

Hello guys.

 

Im using one of the most recent L2JFrozen revision FYI.

 

I've been recently having the issue of many trash talking players on a server. As i assume everyone gets at some point. And i'm just trying to cut it directly by simple banning everyone that is being disrespectul.

 

The thing is, my chat.log file is not recording. 

 

I've set up on developer.propertier file the part where was LogChat = False to true, and even made an attempt to change directly on the source file.

 

I went to say2.java file (which is the file on this rev that controls all say actions) and found the following line:

 

		if (Config.LOG_CHAT)
		{
			final LogRecord record = new LogRecord(Level.INFO, _text);
			record.setLoggerName("chat");
			
			if (_type == TELL)
			{
				record.setParameters(new Object[]
				{
					CHAT_NAMES[_type],
					"[" + activeChar.getName() + " to " + _target + "]"
				});
			}
			else
			{
				record.setParameters(new Object[]
				{
					CHAT_NAMES[_type],
					"[" + activeChar.getName() + "]"
				});
			}
			
			_logChat.log(record);
		}

Since it's not recognizing the Config.LOG_CHAT, i tried simply to replace it to a simple verification like:

 if (activeChar.getLevel() > 0 )

then keep everything else the same.

 

I even changed the permissions on the log folder for users to have full access to create files, but that wasnt it.

 

And what is even weirder to me, is that GMAudit, karmadrop and some other files are created without any problems.

 

Anyone can help?

11 answers to this question

Recommended Posts

  • 0
Posted

Your log.cfg contains necessary properties for log4j but don't uses in L2J Frozen. You need get him content and put into logger.properties file. This file uses as property definer for log4j.

 

Or rename logger.properties to logger.properties.bak and rename log.cfg to logger.properties. for check my assuming.

 

I think it will work.

  • 0
Posted

Replace this code by path "com.l2jfrozen.logs.ChatFilter.java"

public class ChatFilter implements Filter
{
	@Override
	public boolean isLoggable(final LogRecord record)
	{
		return record.getLoggerName() == "chat";
	}
}

to

public class ChatFilter implements Filter
{
	@Override
	public boolean isLoggable(final LogRecord record)
	{
		return record.getLoggerName().equalsIgnoreCase("chat");
	}
}

 

  • 0
Posted (edited)

@Rootware Hello, thanks for the reply and sorry for only being able to respond today. It's been a busy week for me.

 

I tested the changes you suggested on ChatFilter.java, sadly, that did not solve the problem.

 

Is there any other java file/code regarding chatlog of my revision you'd like to see? I can send it. But i'm still not getting any chat logs.

 

What i find weird as i mentioned earlier, is that GMAudit, Karmadrop, loginserver/gameserver logs get created without any problems. Everything is set to true on developer.properties and i even tested an extra line on Say2.java to register the log for everyone above lv 1 as a way to test but still nothing.

 

Edit:

Here's a list of the log files i get from gameserver:

log/loggerOut.log

log/game/_all.txt

log/game/karma_dieDrop.txt

log/game/New_chars.txt

log/game/RaidBossSpawnManager.txt

log/GMAudit/GM-Name [GM-Id].txt

 

And that's it.

I even tried activating the items log on developer.properties (the one it warns can be too heavy) just so see if it would create the file, but nothing.

 

Thanks in advance for trying to help, by the way.

 

Edited by dextroy
  • 0
Posted

The maximal size of log files is defined in logger.properties. I don't see more difference between GMAudit and ChatLog loggers. Try to replace in this place ChatLogger to GMAudit for checking correct calling the logger feature overall in this place.

  • 0
Posted (edited)
1 hour ago, Rootware said:

The maximal size of log files is defined in logger.properties. I don't see more difference between GMAudit and ChatLog loggers. Try to replace in this place ChatLogger to GMAudit for checking correct calling the logger feature overall in this place.

But where would i attempt that replace? There are multiple files that call for ChatLog on java. On developer properties they already call both. Im trying to understand what you're suggesting me to try.

 

As for logger.properties. I haven't touched here's their codes:

log4j.rootLogger=INFO, console,  file

log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.threshold=DEBUG
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%-5p %m%n

log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.append=true
log4j.appender.file.file=log/loggerOut.log
log4j.appender.file.threshold=INFO
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n

 

 And here's the log.cfg file that's also in the folder:

############################################################
#      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.l2jfrozen.logs.ErrorLogHandler
chat.handlers = com.l2jfrozen.logs.ChatLogHandler
chat.useParentHandlers = false
gmaudit.handlers = com.l2jfrozen.logs.GMAuditLogHandler
gmaudit.useParentHandlers = false
item.handlers = com.l2jfrozen.logs.ItemLogHandler
item.useParentHandlers = false
audit.handlers = com.l2jfrozen.logs.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.l2jfrozen.logs.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.l2jfrozen.logs.ConsoleLogFormatter

# log errors (exceptions)
com.l2jfrozen.logs.ErrorLogHandler.pattern = log/error%u.log
com.l2jfrozen.logs.ErrorLogHandler.count = 5
com.l2jfrozen.logs.ErrorLogHandler.formatter = java.util.logging.SimpleFormatter
com.l2jfrozen.logs.ErrorLogHandler.filter = com.l2jfrozen.logs.ErrorFilter
com.l2jfrozen.logs.ErrorLogHandler.level = CONFIG

# log chats
com.l2jfrozen.logs.ChatLogHandler.pattern = log/chat.log
com.l2jfrozen.logs.ChatLogHandler.formatter = com.l2jfrozen.logs.ChatLogFormatter
com.l2jfrozen.logs.ChatLogHandler.filter = com.l2jfrozen.logs.ChatFilter
com.l2jfrozen.logs.ChatLogHandler.append = true
com.l2jfrozen.logs.ChatLogHandler.level = INFO

# log GM Audit
com.l2jfrozen.logs.GMAuditLogHandler.pattern = log/gmaudit.log
com.l2jfrozen.logs.GMAuditLogHandler.formatter = com.l2jfrozen.logs.GMAuditFormatter
com.l2jfrozen.logs.GMAuditLogHandler.filter = com.l2jfrozen.logs.GMAuditFilter
com.l2jfrozen.logs.GMAuditLogHandler.append = true
com.l2jfrozen.logs.GMAuditLogHandler.level = INFO

# log items
com.l2jfrozen.logs.ItemLogHandler.pattern = log/item.log
com.l2jfrozen.logs.ItemLogHandler.formatter = com.l2jfrozen.logs.ItemLogFormatter
com.l2jfrozen.logs.ItemLogHandler.filter = com.l2jfrozen.logs.ItemFilter
com.l2jfrozen.logs.ItemLogHandler.append = true
com.l2jfrozen.logs.ItemLogHandler.level = INFO

# audit
com.l2jfrozen.logs.AuditLogHandler.pattern = log/audit.log
com.l2jfrozen.logs.AuditLogHandler.formatter = com.l2jfrozen.logs.AuditFormatter
com.l2jfrozen.logs.AuditLogHandler.filter = com.l2jfrozen.logs.AuditFilter
com.l2jfrozen.logs.AuditLogHandler.append = true
com.l2jfrozen.logs.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.l2jfrozen.gameserver.level = CONFIG
com.l2jfrozen.loginserver.level = CONFIG
com.l2jfrozen.gameserver.Connection.level = CONFIG
com.l2jfrozen.gameserver.serverpackets.level = FINER
com.l2jfrozen.gameserver.clientpackets.level = FINER
com.l2jfrozen.gameserver.model.L2Character.level = FINER
com.l2jfrozen.gameserver.skills.SkillsEngine.level = WARNING

# Alt Privileges Administration
AltPrivilegesAdmin.pattern = log/admin-commands.log
AltPrivilegesAdmin.formatter = com.l2jfrozen.logs.FileLogFormatter
AltPrivilegesAdmin.append = true
AltPrivilegesAdmin.level = CONFIG

 

Edit:

Just noticed something else bit weird. The log.cfg file calls for com.l2jfrozen.logs.GMAuditFormatter and com.l2jfrozen.logs.GMAuditFilter

 

However, on com.l2jfrozen.logs there's no GMAudit files, only those:

image.png.5b09d8909ee0c87e751b7f1a6a38be88.png

 

I searched for GMAuditFormatter on the source and couldn't find any other file mentioning that besides the log.cfg. So, i don't know exactly where it's running the code to generate the GMAudit.

Edited by dextroy
  • 0
Posted

I don't seeing reason for no logging chat messages. I posted to you all difference between logger properties. Check the Item logging for correct work by the way, because this one 100% the same but with another file name storing.

  • 0
Posted
2 minutes ago, Rootware said:

I don't seeing reason for no logging chat messages. I posted to you all difference between logger properties. Check the Item logging for correct work by the way, because this one 100% the same but with another file name storing.

I tried, but it did not log item drops aswell. I've been trying to dig all over java codes trying to find something but i couldnt find why one is logging and the other one isn't.

 

Would you know what are all the java files related to creating a specific log so i can compare them? I mean, besides those on com.l2jfrozen.logs?

  • 0
Posted

Try to put into logger.properties file the content from log.cfg with overwritting existing content. Possible, L2J Frozen developers forget change this. At this moment logger.properties don't contains informations about logger handlers. that's possible the main reason of missed files which uses specific logging handlers. E.g. GMAudit uses direct storing into the file all info ignores native logger.

  • 0
Posted
42 minutes ago, Rootware said:

Try to put into logger.properties file the content from log.cfg with overwritting existing content. Possible, L2J Frozen developers forget change this. At this moment logger.properties don't contains informations about logger handlers. that's possible the main reason of missed files which uses specific logging handlers. E.g. GMAudit uses direct storing into the file all info ignores native logger.

Ok but just to understand properly, do i do this with the logger.properties - the notepad file only?

 

Or do i have do look for something on the java codes to implement? If so, what files on the java code should i be looking for? I will test all your suggestions on my next maintenance.

  • 0
Posted
51 minutes ago, Rootware said:

Your log.cfg contains necessary properties for log4j but don't uses in L2J Frozen. You need get him content and put into logger.properties file. This file uses as property definer for log4j.

 

Or rename logger.properties to logger.properties.bak and rename log.cfg to logger.properties. for check my assuming.

 

I think it will work.

Ok thanks!

 

I will attempt that on my next maintenance. I'll be back here tomorrow to say if that has worked for me. Thanks for all the tips so far =)

  • 0
Posted

Ok returning with the results.

 

Switching the files, did not work.

 

However, adding log.cfg lines in addition to those on logger.properties worked like a charm!!

 

Thank you so much for the help and all the tips.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚔️ L2JOmen High Five - SERVIDOR 100% RETAIL ⚔️ 📢 SOLICITAMOS APOYO PARA TESTING 📢 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ¡Saludos, comunidad de Lineage II! Estamos desarrollando un proyecto ambicioso y de calidad: L2JOmen High Five, un servidor  100% RETAIL que busca ofrecer la experiencia más auténtica de High Five.  Nos encontramos en la fase de desarrollo y testing, y necesitamos tu ayuda para hacerlo  grande. Si eres un amante del retail, disfrutas probar nuevas funciones y quieres formar  parte de un proyecto serio desde sus inicios, ¡tu apoyo es invaluable! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🎮 CARACTERÍSTICAS PRINCIPALES 🎮 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✅ SERVIDOR 100% RETAIL    • Experiencia auténtica de High Five    • Geodata PTS Official    • Plataforma Premium 2025 ✅ SISTEMA DE RATES DINÁMICO (Progresión Retail x1 con ayuda x5 -> x1)    • XP: 1-20 (5.0x) | 21-40 (3.0x) | 41-60 (2.0x) | 61-75 (1.5x) | 76-85 (1.0x)    • SP: 1-20 (5.0x) | 21-40 (3.0x) | 41-60 (2.0x) | 61-75 (1.5x) | 76-85 (1.0x)    • Adena: x2.0 (Retail con pequeño ajuste)    • Drop y Spoil: x1.0 (Mobs, Raids y Epics) ✅ SISTEMA DE ENCANTAMIENTO PROFESIONAL    • Enchant Safe: +6 (100% seguro hasta +6)    • Enchant Máximo: +30    • Tasas de encantamiento balanceadas:      * 0-3: 100% | 4: 80% | 5: 75% | 6: 70% | 7: 65% | 8: 60%      * 9: 55% | 10: 50% | 11: 45% | 12: 40%      * 13: 10% | 14-25: 5-9% | 26-30: 1-4%    • Sistema Blessed Enchant habilitado ✅ INICIO DE PERSONAJE    • Dynasty Masterwork Set completo +12    • 1 Ticket para Weapon S +12    • Duración: 7 días ✅ CONFIGURACIÓN RETAIL    • Element Limit: Nivel 4    • Buffs: Duración de 1 hora    • Nobless: Obtenible mediante quest    • Subclass Máxima: 10 (Certificación para cada Subclass) ✅ SISTEMA DE FARM Y ECONOMÍA    • Múltiples monedas de farm (Adena, Ancient Adena, Coin of Luck, PC Bang Points, Farm Coins)    • Varias zonas de farm disponibles    • Zona de Party Farm (se habilita cada 3 horas por 1 hora)    • 4 Raids diarias programadas ✅ SISTEMA PC BANG POINTS    • Aproximadamente 10,000 puntos por 24 horas conectado    • Entrega cada 10 minutos    • Jugadores Normales: 60-72 puntos/intervalo    • Jugadores Premium: 96-116 puntos/intervalo    • 5% probabilidad de doble puntos ✅ SHOPS COMPLETOS    • Shop Normal (Adena y Farm Coins)    • Shop Donate (con opciones premium)    • Armaduras y Armas hasta Grado Dynasty, Moirai, S84    • Joyas completas, no incluye Epics    • Scrolls (Normales, Blessed, Divine, Ancient)    • Elementos hasta nivel 4-7    • Accesorios y consumibles ✅ SISTEMA VIP    • 5 niveles de VIP disponibles    • Bonificaciones progresivas de XP/SP/Drop    • Recompensas diarias exclusivas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🤝 ¿QUÉ NECESITAMOS DE TI? 🤝 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔍 TESTERS ACTIVOS    • Jugadores que prueben todas las funciones del servidor    • Feedback constructivo sobre bugs, balance y mejoras    • Reporte de problemas encontrados 🎮 JUGADORES DEDICADOS    • Amantes del retail que valoren la experiencia auténtica    • Personas dispuestas a ayudar a mejorar el proyecto    • Comunidad comprometida con el crecimiento del servidor 📊 REPORTES DETALLADOS    • Bugs y errores encontrados    • Sugerencias de balance    • Opiniones sobre el gameplay    • Feedback sobre sistemas implementados ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 💎 ¿POR QUÉ UNIRTE A L2JOmen? 💎 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🌟 PROYECTO SERIO Y COMPROMETIDO    • Desarrollo constante y mejoras continuas    • Atención a la comunidad activa    • Transparencia en todas las decisiones 🎯 EXPERIENCIA 100% RETAIL    • Sin modificaciones que rompan el juego original    • Balance auténtico de High Five    • Gameplay puro y tradicional ⚡ TECNOLOGÍA DE VANGUARDIA    • Servidor optimizado y estable    • Geodata oficial de PTS    • Sistema robusto y sin lag    • Sistema Anticheat Premium 🎁 RECOMPENSAS PARA TESTERS    • Participación activa en el desarrollo    • Reconocimiento especial en el lanzamiento    • Beneficios exclusivos para early testers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📞 CONTACTO E INFORMACIÓN 📞 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Si estás interesado en formar parte de este proyecto y ayudarnos a crear el mejor  servidor retail de High Five, contáctanos. Tu apoyo es fundamental para hacer realidad  este grandioso proyecto. 💬 Únete a nuestro grupo de testing 🌐 WhatsApp: https://chat.whatsapp.com/Km6uRtFsoUq2tNZZalo5HB?mode=wwt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🏆 ¡Juntos construimos el mejor servidor retail! 🏆 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  
    • any server used these files? if yes let me know in pm.
    • L2Net is an in-game (IG) bot. I already have Adrenaline for that. I'm looking for an out-of-game (OOG) bot - one that doesn’t require the Lineage 2 client to run.
    • I came here to say something about ave but it seems i am late already Note for people who might see this topic. Use custom sources of updater, do it your self, learn do it on your time and schedule. its only a how to build it in visual studio youtube video and you're done 90%   no time? pay to a pro like nevesoma.   its easy as fuck
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock