Part of the EllisLab Network
   
3 of 3
3
FireStick 1.1 (Performance logging add-on library)
Posted: 30 January 2009 02:05 PM   [ Ignore ]   [ # 21 ]  
Grad Student
Rank
Total Posts:  57
Joined  01-23-2009
tonydewan - 30 January 2009 05:58 PM

This is really nice library. It’s been a few months since you last worked on this, but do you have anything new planned?  I would love to have more out of the box control of the logging process.  I understand why you’ve created a new database just for logs, but I think I would prefer a single table.  Or maybe a text file?

Also, your in code documentation has “Foobar” were I’m guessing “Firestick” should go.

Check out the library, you can just change set the table name to a static one instead automatically creating a new one for each day of the year.

$table_name = $this->db_name . ‘.performance_log_’ . @date(‘ymd’);

$table_name = $this->db_name . ‘.performance_log_’ . @date(‘y’);

 Signature 

GoTalkFitness.com

Profile
 
 
Posted: 14 July 2010 08:25 PM   [ Ignore ]   [ # 22 ]  
Summer Student
Total Posts:  5
Joined  05-09-2010

I found that in MySQL 4.X I had to change the engine type from Archive to MyISAM… now it works perfectly… so, in my case, this insert works better (if you’re using MySQL 4.x this might help)

CREATE DATABASE IF NOT EXISTS logs;

DROP TABLE IF EXISTS logs.firestick_log_template;
CREATE TABLE logs.firestick_log_template (
  ip               INT NOT NULL,
  page             VARCHAR(255) NOT NULL,
  user_agent         VARCHAR(255) NOT NULL,
  referrer           VARCHAR(255) NOT NULL,
  logged             TIMESTAMP NOT NULL
                  default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  memory             INT UNSIGNED NOT NULL,
  render_elapsed       FLOAT NOT NULL,
  ci_elapsed         FLOAT NOT NULL,
  controller_elapsed     FLOAT NOT NULL,
  mysql_elapsed       FLOAT NOT NULL,
  mysql_count_queries   TINYINT UNSIGNED NOT NULL,
  mysql_queries       TEXT NOT NULL
) ENGINE=MyISAM;

Profile
 
 
   
3 of 3
3