Jump to content
Eternal Lands Official Forums
ttlanhil

chat_log split by channel (& log rotation)

Recommended Posts

first off... you can turn this on/off as an option. if you don't want to use it, you can continue to use the unified chat_log.txt we currently have (which will also likely be the default)

if split by channel, you will get something like chat_log_chan3.txt which has the channel 3 chat

 

you will be able to toggle this at any time, and there will be a message in the log about it (the split logs will have the usual "log started at <time>"/"log closed" message, unified log will have something like "splitting log to channels" and "returning to single chat_log file" with the timestamps)

 

another option is that you can have both. you have a log per channel and it's also logging to the unified log... more space required, but possibly more versatile when you wanna go through your logs

 

problem is, what to do with local/server/PMs/modchat/GMs/#Message/etc... should these all still go to the unified chat_log? or should these all have their own log files?

 

also, do you want some sort of log rotate system set up?

for example, when your log (chat, error, etc) gets to a certain size (like 100Kb or 1Mb), or each week, a new file is started and the old one left there as an archive(probably with a name showing the date; failing that an increasing number. chat_log_1.txt chat_log_2.txt etc)

 

also, because this could end up with many log files, do you want a 'logs' directory in the EL directory where all logs (including error log and such as well) will go? (I think this is probably vital if either of the above two options are used... however if you only have the rotate, you could always have current log in EL dir, and old ones in a subdir)

 

note: I'm quite happy to do all the coding for this, I'm just after feedback on if and how it should be done from the players

 

so. do people want this option? and if so, any changes or points on the topics?

Share this post


Link to post
Share on other sites

first off... you can turn this on/off as an option. if you don't want to use it, you can continue to use the unified chat_log.txt we currently have (which will also likely be the default)

if split by channel, you will get something like chat_log_chan3.txt which has the channel 3 chat

 

you will be able to toggle this at any time, and there will be a message in the log about it (the split logs will have the usual "log started at <time>"/"log closed" message, unified log will have something like "splitting log to channels" and "returning to single chat_log file" with the timestamps)

Very nice, I like this a lot.

 

another option is that you can have both. you have a log per channel and it's also logging to the unified log... more space required, but possibly more versatile when you wanna go through your logs

This is also fine with me but I don't know if people will want to use up this much space. It's a good idea in theory though.

 

problem is, what to do with local/server/PMs/modchat/GMs/#Message/etc... should these all still go to the unified chat_log? or should these all have their own log files?

These should go into the unified chat_log.

 

also, do you want some sort of log rotate system set up?

for example, when your log (chat, error, etc) gets to a certain size (like 100Kb or 1Mb), or each week, a new file is started and the old one left there as an archive(probably with a name showing the date; failing that an increasing number. chat_log_1.txt chat_log_2.txt etc)

Yes this is very nice, I do this anyway because after a while it takes forever for my chatlog to load.

 

also, because this could end up with many log files, do you want a 'logs' directory in the EL directory where all logs (including error log and such as well) will go? (I think this is probably vital if either of the above two options are used... however if you only have the rotate, you could always have current log in EL dir, and old ones in a subdir)

Yes this would be pretty much needed.

 

These options are exactly what I was wanting. ^_^

Share this post


Link to post
Share on other sites

Yes! Excellent.

 

As far as the breakdown of your questions, there's nothing I could say differently than Aislinn has already mentioned.

 

I'd love to have this option!

Share this post


Link to post
Share on other sites

And I was going to make a log rotator also. Looks like I can focus on one of my other ideas then. :P

Edited by Drakos7

Share this post


Link to post
Share on other sites

And I was going to make a log rotator also. Looks like I can focus on one of my other ideas then. :)

heh, just finished the log rotate code (error logging has the hooks to use it, chat log doesn't, but that's the other part of the code I'm working on anyway)

as far as I can tell, the code is safe and works as intended (though my C-fu isn't great enough that it can't be improved upon, I'm sure)

can tell it to move logs to another relative directory, and this works several dirs deep if you like (it doesn't care how deep, so long as you don't go making it so long you'd overflow the path string; this will result in an error message being logged and the command will return early. so it's safe :) )

 

next step is to figure out where channel logs should go. probably in the /logs/ dir (otherwise you get overcrowded in main dir) and then rotated into /logs/chatlogs/

chat_log (unified or only PMs/server/etc) will probably need to stay in the EL dir, though that's not consistent... old ones get rotated to the same place as channel logs

connection, error, server logs will all be in EL dir, and rotated to /logs/errlogs/

 

hmm. yup. now to get to work!

 

edit: actually, I have another thing on the list as well now, option to split chat_log by username. anyone who's had more than one char on at the same time will know how ugly the log gets

Edited by ttlanhil

Share this post


Link to post
Share on other sites

okay, it's now ready for testing (but remember, if you're not a known dev/tester, you can't use this on the main server)

https://developer.berlios.de/patch/index.ph...9&group_id=1256

(if you don't know how to get cvs and apply said patch, you need not apply ^_^ )

 

do check the patch notes, and see if there's places where there's a potential bug and/or chance to optimise the code

 

this is released under the usual: it works for me, and it looks okay as well. it applied cleanly to pristine-cvs when patch was made, but if it breaks your computer/watch/goldfish-bowl it aint my fault

 

please try it out and let me know if there are any problems, if not then it's another oen I can add to my list of patches I'd like to see go into the client :P

 

have fun ^_^

Edited by ttlanhil

Share this post


Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×