public bool RecordEvent(UserRegionEvent ev) { try { using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) { dbcon.Open(); using (MySqlCommand cmd = new MySqlCommand( "insert into UserRegionEvents (UserId, UserName, Type, GridId, RegionName, DateTime) values (?UserId, ?UserName, ?Type, ?GridId, ?RegionName, ?DateTime)", dbcon)) { cmd.Parameters.AddWithValue("?UserId", ev.UserId); cmd.Parameters.AddWithValue("?UserName", ev.UserName); cmd.Parameters.AddWithValue("?Type", ev.EventType); cmd.Parameters.AddWithValue("?GridId", ev.GridId); cmd.Parameters.AddWithValue("?RegionName", ev.RegionName); cmd.Parameters.AddWithValue("?DateTime", ev.DateTime); cmd.ExecuteNonQuery(); } } } catch (Exception e) { m_log.ErrorFormat("[MYSQL EVENT RECORDER]: Could not record {0}, error {1}", ev, e); return false; } return true; }
public bool RecordEvent(UserRegionEvent ev) { m_log.DebugFormat( "[EVENT RECORDER]: Notified of avatar {0} {1} {2} event in scene {3}", ev.UserName, ev.UserId, ev.EventType, ev.RegionName); return true; }