[wsf-c-dev] [php] Call log from PHP Scripts

Samisa Abeysinghe samisa at wso2.com
Sat Apr 5 03:05:06 PDT 2008


Dimuthu Gamage wrote:
> Looks like finally we agreed on this, I will raise a JIRA and suggest 
> possible API.

No I do not think we have agreed on this. You reply to my mail, and 
before I reply you call it "agreed upon". That is not right :)

In your original mail you said:
"Currently we don't have proper way of logging from PHP Scripts. 
Currently We are using error_log function which write logs in apache. 
but we should write log to wsf_php_server.log and wsf_php_client.log so 
users are not confused.

Shall we  implement wrapper for axis2_log_write function for use in PHP? "

Now, there is no mention of "internal only" use as you mention in "Not 
really, Since we don't expect users to use this function in their code. 
Rather we used it in internal stuff.".

So I do not think you have explained the requirement right in the first 
place.

Here are my questions:
1. Is this an internal only function?
2. Where is this placed?
3. How can we "hide" it form users so that they do not use it if it is 
internal only?

Thanks,
Samisa...

>
> Thanks
> Dimuthu
>
> Dimuthu Gamage wrote:
>>
>> Samisa Abeysinghe wrote:
>>> Dimuthu Gamage wrote:
>>>> Hi samisa,
>>>>
>>>> I think error_log function is a standard function which write logs 
>>>> in to the apache server log (error.log), If we use that , for a 
>>>> trouble of a user, he need to attach all 3 files to figure out the 
>>>> error. That's why I suggested to limit to those 2, 
>>>> wsf_php_client.log and wsf_php_server.log
>>>
>>> Ok, I understand your concern. However, my question is, PHP users 
>>> are used to use error_log. If we come up with a new function, it is 
>>> adding additional burden, meaning, it adds complications in terms of 
>>> PHP user, inst it?
>>
>> Not really, Since we don't expect users to use this function in their 
>> code. Rather we used it in internal stuff. And I saw that 
>> AXIS2_LOG_ERROR is used inside wsf/php c code. It means we have been 
>> using it throughout the wsf/php. So there won't be different in 
>> logging php scripts stuff to the same log. And in a time php scripts 
>> is replaced with c implementation there won't be different in logs. 
>> So I think we should go with having a wrapper for the axis2_log_write.
>>
>>
>> Thanks
>> Dimuthu
>>
>>>
>>> Samisa...
>>>
>>>>
>>>> Thanks
>>>> Dimuthu
>>>>
>>>> Samisa Abeysinghe wrote:
>>>>> Dimuthu Gamage wrote:
>>>>>> Hi,
>>>>>> Currently we don't have proper way of logging from PHP Scripts. 
>>>>>> Currently We are using error_log function which write logs in 
>>>>>> apache. but we should write log to wsf_php_server.log and 
>>>>>> wsf_php_client.log so users are not confused.
>>>>>>
>>>>>> Shall we  implement wrapper for axis2_log_write function for use 
>>>>>> in PHP?
>>>>>
>>>>> What is the standard way of looging stuff in PHP? If there is a 
>>>>> standard way, we should rather find a way to use that, becuase, to 
>>>>> me, wsf_php_server.log and wsf_php_client.log are C logs, but 
>>>>> rather PHP scripts should write to PHPish logs.
>>>>>
>>>>> Samisa...
>>>>>
>>>>> _______________________________________________
>>>>> Wsf-c-dev mailing list
>>>>> Wsf-c-dev at wso2.org
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/wsf-c-dev
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Wsf-c-dev mailing list
>>>> Wsf-c-dev at wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/wsf-c-dev
>>>>
>>>>
>>>
>>>
>>
>>
>> _______________________________________________
>> Wsf-c-dev mailing list
>> Wsf-c-dev at wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/wsf-c-dev
>>
>
>
> _______________________________________________
> Wsf-c-dev mailing list
> Wsf-c-dev at wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/wsf-c-dev
>
>


-- 
Samisa Abeysinghe 
Software Architect; WSO2 Inc.

http://www.wso2.com/ - "Oxygenating the Web Service Platform."




More information about the Wsf-c-dev mailing list