CodeIgniter Forums
FireStick 1.1 (Performance logging add-on library) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: FireStick 1.1 (Performance logging add-on library) (/showthread.php?tid=11755)

Pages: 1 2 3


FireStick 1.1 (Performance logging add-on library) - El Forum - 01-30-2009

[eluser]tonydewan[/eluser]
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.


FireStick 1.1 (Performance logging add-on library) - El Forum - 01-30-2009

[eluser]bd3521[/eluser]
[quote author="tonydewan" date="1233356281"]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.[/quote]

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');


FireStick 1.1 (Performance logging add-on library) - El Forum - 07-14-2010

[eluser]Wible[/eluser]
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;