May 25, 2008

Change the Way XChat Logs Channels/Queries

Updated: May 25, 2008

The default setting for this is %n-%c.log which stands for Network-Channel/Nick.log. For example, a log file created on the Freenode network for the #kubuntu channel will be named Freenode-#kubuntu.log. You can change this by adding or removing some of the format identifiers. Go to Settings -> Preferences -> Logging and put there the format which you would like to use. For example, I use this system:


This will log the file as Network_Year_Month_Channel/Nick.log. You can use conversion specifications listed here. Some of them are:

%a - abbreviated weekday name
%A - full weekday name
%b - abbreviated month name
%B - full month name
%d - day of month as decimal number [01,31]
%m - month as decimal number [01,12]
%y - last two digits of the year as decimal number [00,99]
%Y - year as decimal number

Other examples would be:


The last one will log the file as Network/Year_Month_Day_Channel/Nick.log. Notice that 'Network' will be treated as a directory inside which the logs will be created. You can put something of your own choice, but make sure the system will not get XChat to create very large log files. For example and especially if you use to join large channels, this is a bad idea: %n_%Y_%c.log. This will create a log file which will be used an entire year and could get extremely large.

No comments: