Not a developer? Go to MovableType.com

Ask an Expert

Activity Log maintenance issues

Asked by Samuel Schwartz
Posted October 28, 2009, in Featured.

Running MT 4.23-en, on a fairly active blog (at least daily entries and comment activity). The activity log has not been maintained (i.e. cleared) in about three years, and has grown quite large (greater than 33 megabytes, total space, over 176,000 entries).

I would like to dump the data from the log for later exploration (as I’m working on multiple user problems on the blog, not relevant here) and then clear the log. However, I have failed to do so in several ways.

Doing a mysqldump via phpMySQLAdmin fails, producing an empty file.

Using MT’s “download log as CSV” for the complete log produces no downloaded file, and a blank page, with the incomplete URL as follows:

http://my.blog's.hostname/cgi-bin/admin/mt.cgi?__mode=export_log&magic_token=P7YbpHVdtK3q53PZqNj3o7qQG6Zm6dx4ozvO9ioH&return_args=__mode%3Dview_log&filter_args=

Note the absence of anything after the &filter_args=. Not sure if that’s significant?

Using MT’s Activity Log filtering capability I can get most of the data, filtering by classification to reduce the size of each downloaded log segment, but for classification “Comments” I get a downloaded file with only the following information in it:

Got an error: Undefined subroutine &MT::Template::Context::core_tags called

Does this ring any bells with anyone? Am I missing an MT component, or is possibly there some corruption in a comments-related record in the mt_log database table? What else might I do to debug this?

Back

1 Answer

Mike T

Mike T on October 28, 2009, 11:20 a.m. Reply

You may want to clean up the log first before exporting it to reduce the noise. There are some of the queries I run in a stored procedure in my MySQL database:

delete from mt_log where log_message like 'Scheduled Tasks Update%';
delete from mt_log where log_category = 'straight_search';
delete from mt_log where log_message like 'news callback%';
delete from mt_log where log_message like 'Ping%';

Mike T

When I’m not hacking on Movable Type, I sometimes work on bringing WordPress themes over as styles for the default template set. To see a collection of this work, visit my themes blog.

Website: http://www.codemonkeyramblings.com/plugins

Ask An Expert