Welcome Guest, Not a member yet? Register   Sign In
FireStick 1.1 (Performance logging add-on library)
#21

[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.
#22

[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');
#23

[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;




Theme © iAndrew 2016 - Forum software by © MyBB