Log Chat To SQL

Discussion in 'Archived: Plugin Requests' started by Geoff Winans, Jan 5, 2011.

  1. Offline

    Geoff Winans

    A plugin to log chat to SQL and remove it from appearing in the log.

    Best method:

    Log chat in memory for X seconds (this way you don't slam the DB)
    Create bulk insert
    Run insert


    CREATE TABLE mc_chat_log
        log_id bigint not null primary key auto_increment,
        log_time DATETIME,
        log_player varchar(32),
        log_text TEXT,
  2. Offline


    So if you are flushing the chat to cache and its a lot of data, how bad is the lag generated?

    Its best to break tasks up into small chunks; Batching sounds good but I honestly don't know about threading in Bukkit as I know Hey0 was single threaded.. and the sql library I see people wanting to use is single threaded itself anyway.
  3. Offline


    There won't be enough chatter in X seconds to produce a lot of noticeable lag. Even if it's every 30, 60 seconds.
  4. Offline


    Might give this a try when bukkit has a db standard

Share This Page