[firebug] Re: PHP server messages

2017-03-07 Thread Erik Krause

Am 06.03.2017 um 17:03 schrieb Lawrence San:

I don't understand why people are ​now ​ saying you ​_have​_​ to
use Chrome Logger ​ to log PHP from Firefox.


Sorry, I was not clear enough: My version of chromePHP acts as a drop-in 
replacement for FirePHP (at least the part I regularly use). You can 
re-use all FirePHP log, warn, info, error, etc. calls.


--
Erik Krause
http://www.erik-krause.de

--
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/7ad9db4b-14a6-c972-4c7c-f61a33364ec4%40gmx.de.
For more options, visit https://groups.google.com/d/optout.


Re: [firebug] Re: PHP server messages

2017-03-07 Thread Sebastian Zartner
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:
> ​
> 
> function phpToConsole( $data ) {
>
> ob_start();
>
> $output = 'console.log(' . json_encode( $data ) . ');';
> $output  = sprintf( '%s', $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.


Re: [firebug] Re: PHP server messages

2017-03-06 Thread Lawrence San
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:
​
%s', $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/CAMoMLKj6YGiPeE5a64KK-G8gg%3DV7YjE8MMuXXz%2BQSd7ug3QWyw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[firebug] Re: PHP server messages

2017-03-06 Thread Erik Krause

Am 04.03.2017 um 10:21 schrieb Pedro Bastos das Neves:

The crhome logger is the only choice? This one doesn't work well too?


I've modified chromePHP such that it is a bit more FirePHP-like:
https://github.com/ErikKrause/chromephp

--
Erik Krause

--
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/66bacdec-880d-2fb9-2885-cd130474e9cd%40gmx.de.
For more options, visit https://groups.google.com/d/optout.


[firebug] Re: PHP server messages

2017-03-06 Thread Sebastian Zartner
Yes, Chrome Logger is what you need to use.
If you have issues integrating it into your PHP code, you should open an 
issue for Chrome Logger . 
If you integrated it into your PHP code, but the output is not shown or 
incorrectly shown in the DevTools console, you should first read the related 
documentation 
.
 
If you then still experience problems, ask on IRC 
, Twitter 
 or Stack Overflow 
 or file 
a bug against the DevTools 

.

Sebastian

On Monday, March 6, 2017 at 11:48:20 AM UTC+1, Pedro Bastos das Neves wrote:
>
> How to log to the console php server messages? And witch server library to 
> use?
> I'm asking this because Firephp is not working.
> The crhome logger is the only choice? This one doesn't work well too?
> Thanks,
>

-- 
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/6bf0c306-c4c7-4953-96c3-c7e93b4cd42a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.