Part of the EllisLab Network
   
 
Fire Ignition
Posted: 28 March 2007 06:53 PM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  735
Joined  10-18-2006

Fire CI is a combination of a Firefox Extension and a CI core modification.
It is a developer tool that allows you to see the CI log message (and your custom messages) in the Firefox browser when executing a CI page.
It can be enable/disable from the config.php file.

It uses
Firebug (Firefox extension)
FirePHP (Firebug extension)

A screenshot is attached to this post. - Attachment is not working, screenshoot is also here
The CI modificated files can be downloaded here

This is Candidate Release 1, I’m expecting feedback to “wikipedize” it.

—-Update—- New version with no core modiification available here

Image Attachments
fireci_screenshot.gif
Click thumbnail to see full-size image
 Signature 

Once in a while I remember I use Twitter

Profile
 
 
Posted: 28 March 2007 07:31 PM   [ Ignore ]   [ # 1 ]  
Lab Assistant
RankRank
Total Posts:  116
Joined  07-31-2006

o_O This is gonna be goooooooood!

Endgame would be not to have to modify the core tho… can you not just extend it?

 Signature 

Andrew Somervell Beer

Profile
 
 
Posted: 28 March 2007 07:36 PM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  735
Joined  10-18-2006

I wanted to… but CI does not keep a log record, it writes the log file for each message, so I had to create a var to keep the log track.
Also I didn’t want to write code for each controller… so I didn’t found out onther way to do this.

But the core modification is not big. If you disable fireci from your config.php you will have one useless function and an two extra-usless methods in the log class. The CI performance does not have to be worse.

 Signature 

Once in a while I remember I use Twitter

Profile
 
 
Posted: 28 March 2007 07:50 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  277
Joined  02-07-2007

Oooh, this looks very nice.

Profile
 
 
Posted: 29 March 2007 11:32 AM   [ Ignore ]   [ # 4 ]  
Grad Student
Avatar
Rank
Total Posts:  95
Joined  07-05-2006

surprised Good job

 Signature 

Server 2003 SP1—IIS6.0—PHP 5.2.0—SQL SERVER EXPRESS 2005—CI 1.5.2; downer  hmmm surprised grin snake

Profile
 
 
Posted: 29 March 2007 03:28 PM   [ Ignore ]   [ # 5 ]  
Grad Student
Rank
Total Posts:  91
Joined  03-09-2007

awesome looks like this could be pretty handy

Profile
 
 
Posted: 23 April 2007 11:03 PM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  735
Joined  10-18-2006

Hi people

After some thinking I was able to implement FireCI without modifing CI Core.
The only changes is on the application/confg/config.php file, where I have added the fireci value to enable/disable.
The new version is able to download here.

Please notice that Controllers have to extend MY_Controller instead of Controller wink
And also notice that you will need to have log messages for testing. If your log level is 0, this will be useless

Please help me debugging so I can “wikipedize” this.

 Signature 

Once in a while I remember I use Twitter

Profile
 
 
Posted: 24 April 2007 12:44 AM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6762
Joined  03-23-2006

Seppo, this is brilliant.  Well done sir.  One quick note, you might want to consider renaming it to something without “CI” in title. 

Oh man, this is nice work.  When am I supposed to find time for all this?  Can you make a “give_extra_hours_in_day(+4)” function to accompany that? smile

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
Posted: 24 April 2007 01:00 AM   [ Ignore ]   [ # 8 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  759
Joined  02-05-2007

It is 2:00am in Toronto. Does Mr. Allard ever tire?

Thank you Seppo.

 Signature 

“I am the terror that flaps in the night”

Profile
 
 
Posted: 24 April 2007 07:30 AM   [ Ignore ]   [ # 9 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6762
Joined  03-23-2006

LOL smile

I was feel guilty for neglecting these forums lately, but if Seppo got off his lazy butt and wrote me that function I’d be in bed by 10!

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
Posted: 24 April 2007 07:55 AM   [ Ignore ]   [ # 10 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  735
Joined  10-18-2006

Thanks Derek

Updated the name. New download available here

 Signature 

Once in a while I remember I use Twitter

Profile
 
 
Posted: 06 June 2007 06:10 PM   [ Ignore ]   [ # 11 ]  
Summer Student
Total Posts:  5
Joined  05-17-2007

Love this, made some changes that others may be interested in:

In MY_controller added this function

function _fireignition_message($message)
    
{
        
if(!function_exists('fireignition_message')){
            
static $LOG;
            
            
$config =& get_config();
            if (
$config['fireignition'] === false)
            
{
                
return;
            
}
        
            $LOG
=& load_class('Log');
            
$LOG->fireignition_log($message);
            return;
        
}
        fireignition_message
($message);
        return;
    
}

Then in MY_Log.php I added

var $_writeLog = false;

and changed the function MY_Log and write_log to

function MY_Log() {
        $config
=& get_config();

        
$this->_fireignition = isset($config['fireignition']) ? $config['fireignition'] : false;
        if(isset(
$config['log_file'])){
            $this
->_writeLog = $config['log_file'];
        
}else{
            $this
->_writeLog = (isset($config['log_threshold']) && $config['log_threshold']>0) ? true : false;
        
}
        parent
::CI_Log();
    
}
    
    
function write_log($level = 'error', $msg, $php_error = FALSE) {
        
if ($this->_fireignition)
        
{
            $level
= strtoupper($level);
            if ( ! isset(
$this->_levels[$level]) OR ($this->_levels[$level] > $this->_threshold))
            
{
                
return FALSE;
            
}
            $this
->_log .= strtoupper($level).' '.(($level == 'INFO') ? ' -' : '-').' '.date($this->_date_fmt). ' --> '.$msg."\n" . '<br />';
        
}
        
if($this->_writeLog){
            parent
::write_log($level, $msg, $php_error);
        
}
    }

In the core config near $config[‘log_threshold’] = 0; I added $config[‘log_file’] = FALSE; though if left out the log_threshold >0 it assumes log_file is true.

Usage has changed from fireignition_message(‘message’); to $this->_fireignition_message(‘message’);

What does this mean:
1. If threshold is set to 0 but fireignition variable is left to true, you no longer get an error message about the function not being available.
2. This allows you to have firephp output on without logging, it also lets you set threshold to whatever output you want to be available to firephp without writing log files.

Hope this is some help, fire ignition has brought something to my coding I always wanted, thanks a lot to the author, hope you don’t mind me posting the above.

Profile
 
 
Posted: 01 November 2007 12:51 AM   [ Ignore ]   [ # 12 ]  
Lab Assistant
RankRank
Total Posts:  109
Joined  06-13-2007

Hello i was just wondering what was happening with this project, all the links seem to be broken. Does anyone have this that they can put for download somewhere?

Profile
 
 
Posted: 16 November 2007 09:17 AM   [ Ignore ]   [ # 13 ]  
Summer Student
Total Posts:  21
Joined  10-30-2007

I’m wondering the same thing, did this project disappear completely?

Profile
 
 
Posted: 01 January 2008 09:33 PM   [ Ignore ]   [ # 14 ]  
Summer Student
Total Posts:  3
Joined  12-15-2007

* bump. Anybody have this file?

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 66429 Total Logged-in Users: 30
Total Topics: 84793 Total Anonymous Users: 4
Total Replies: 455036 Total Guests: 199
Total Posts: 539829    
Members ( View Memberlist )
Newest Members:  X_franbaguasllogocsaturkeyPeter BryanttherendStudioGeorgiaJZeerfedegheEdged