Please forgive me my forgetfullness and ignorance, Lawrence and Erik! 
Indeed, you provide good alternatives for Chrome Logger.

After all, server-side logging works through HTTP headers, so if somebody 
wants to, he or she can implement their own tool to create those headers, 
or use the simple solution to make console.log() calls outlined by Lawrence.

Sebastian

On Monday, March 6, 2017 at 5:03:58 PM UTC+1, San wrote:
>
> I don't understand why people are 
> ​now ​
> saying you 
> ​_​
> have
> ​_​
> to use Chrome Logger
> ​ to log PHP from Firefox.​ That's not true
> . In this discussion list, 
> ​see
>  the thread entitled "replacement for firephp (devtools)"
> ​ from late September to early December 2016 (sorry, I don't know how to 
> link to it). In that thread, Erik, myself, and a couple of others talked 
> about other ways of getting PHP logging in Firefox, without FirePHP. 
> (Although FirePHP was certainly better and I wish it would come back to 
> Firefox.)
>
> Here's the method I use, and it still works:
>
> Set up a separate PHP file in your standard PHP path location. This is 
> originally based on someone else's script (unfortunately I don't know 
> whose, so I can't credit him here), but I made some modifications to 
> simplify it. I call the file PhpToConsole.php. I've removed some of the 
> devel comments below; its functional contents are:
> ​
> <?php
>
> function phpToConsole( $data ) {
>
>     ob_start();
>
>     $output = 'console.log(' . json_encode( $data ) . ');';
>     $output  = sprintf( '<script>%s</script>', $output );
>
> // TOGGLE: Temporarily comment out just the echo line below, if desired to 
> clear the Console for other (like JS) calls:
>     echo $output;
>
> }
>
> ?>
>
>
> ​I call it (i.e. log something to the Consol​e) simply like this:
>
>      phpToConsole( "[PHP] My log message including $myVariable goes here." 
> );
>
> I keep the phpToConsole script in a separate file, and pull it in with 
> a require_once in every other PHP file, but the script is so short it could 
> simply be placed at the top of every file that needs it.
>
> Almost featureless, but it's dead simple and works for now.
>
> - Lawrence
>

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to firebug+unsubscr...@googlegroups.com.
To post to this group, send email to firebug@googlegroups.com.
Visit this group at https://groups.google.com/group/firebug.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/firebug/4960be8d-b7fc-4737-9c81-8a11b6c70b74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to