You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by "David Hilowitz (Created) (JIRA)" <ji...@apache.org> on 2011/12/21 23:33:31 UTC

[jira] [Created] (LOG4PHP-166) It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.

It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.
---------------------------------------------------------------------------------------------------------------------------------------

                 Key: LOG4PHP-166
                 URL: https://issues.apache.org/jira/browse/LOG4PHP-166
             Project: Log4php
          Issue Type: Improvement
    Affects Versions: 2.1, 2.2
            Reporter: David Hilowitz
            Priority: Minor
             Fix For: 2.3


It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 

Here's why:  If something is wrong with the Mongo database server, the server is offline or whatever, it often takes a long time (10 or more seconds) to fail and throw an exception. This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 

Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 

I already have a patch that fixes this issue. The main gist of it is this. Change this:

$this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));

to this:

$this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Resolved] (LOG4PHP-166) LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.

Posted by Christian Grobmeier <gr...@gmail.com>.
Looks good now, thanks for getting back to this

On Thu, Dec 22, 2011 at 3:38 PM, Ivan Habunek <iv...@gmail.com> wrote:
> Hi!
>
> Good catch. Fixed it now. Have another look please.
>
> Regards,
> Ivan
>
> On 22 December 2011 15:31, Christian Grobmeier <gr...@gmail.com> wrote:
>> Hi Ivan,
>>
>> I can see: DEFAULT_TIMEOUT_VALUE
>> but I cannot see how it is used - so far it looks to me always 0 is
>> used in case no timeout has been specified
>>
>> Cheers
>>
>> On Thu, Dec 22, 2011 at 2:30 PM, Ivan Habunek (Resolved) (JIRA)
>> <ji...@apache.org> wrote:
>>>
>>>     [ https://issues.apache.org/jira/browse/LOG4PHP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>>
>>> Ivan Habunek resolved LOG4PHP-166.
>>> ----------------------------------
>>>
>>>       Resolution: Fixed
>>>    Fix Version/s: 2.3
>>>         Assignee: Ivan Habunek
>>>
>>> Thanks for the contribution. I have added the docs & tests for the new parameter. The code is in trunk and will be released in 2.3.
>>>
>>>> LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.
>>>> -------------------------------------------------------------------------------------------------------------------
>>>>
>>>>                 Key: LOG4PHP-166
>>>>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-166
>>>>             Project: Log4php
>>>>          Issue Type: Improvement
>>>>          Components: Code
>>>>    Affects Versions: 2.1, 2.2
>>>>            Reporter: David Hilowitz
>>>>            Assignee: Ivan Habunek
>>>>            Priority: Minor
>>>>             Fix For: 2.3
>>>>
>>>>         Attachments: patch_commit_59b06e94668f.patch
>>>>
>>>>   Original Estimate: 2h
>>>>  Remaining Estimate: 2h
>>>>
>>>> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.
>>>> Here's why:  If something is wrong with the Mongo database server -- for example, if the server is offline -- it often takes a really long time (10 or more seconds) to fail and throw an exception.  This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data.
>>>> Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc.
>>>> I already have a patch that fixes this issue. The main gist of it is this. Change this:
>>>> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));
>>>> to this:
>>>> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));
>>>> Useful Resources:
>>>> * PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php
>>>
>>> --
>>> This message is automatically generated by JIRA.
>>> If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
>>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>>
>>>
>>
>>
>>
>> --
>> http://www.grobmeier.de
>> https://www.timeandbill.de



-- 
http://www.grobmeier.de
https://www.timeandbill.de

Re: [jira] [Resolved] (LOG4PHP-166) LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.

Posted by Ivan Habunek <iv...@gmail.com>.
Hi!

Good catch. Fixed it now. Have another look please.

Regards,
Ivan

On 22 December 2011 15:31, Christian Grobmeier <gr...@gmail.com> wrote:
> Hi Ivan,
>
> I can see: DEFAULT_TIMEOUT_VALUE
> but I cannot see how it is used - so far it looks to me always 0 is
> used in case no timeout has been specified
>
> Cheers
>
> On Thu, Dec 22, 2011 at 2:30 PM, Ivan Habunek (Resolved) (JIRA)
> <ji...@apache.org> wrote:
>>
>>     [ https://issues.apache.org/jira/browse/LOG4PHP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>
>> Ivan Habunek resolved LOG4PHP-166.
>> ----------------------------------
>>
>>       Resolution: Fixed
>>    Fix Version/s: 2.3
>>         Assignee: Ivan Habunek
>>
>> Thanks for the contribution. I have added the docs & tests for the new parameter. The code is in trunk and will be released in 2.3.
>>
>>> LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.
>>> -------------------------------------------------------------------------------------------------------------------
>>>
>>>                 Key: LOG4PHP-166
>>>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-166
>>>             Project: Log4php
>>>          Issue Type: Improvement
>>>          Components: Code
>>>    Affects Versions: 2.1, 2.2
>>>            Reporter: David Hilowitz
>>>            Assignee: Ivan Habunek
>>>            Priority: Minor
>>>             Fix For: 2.3
>>>
>>>         Attachments: patch_commit_59b06e94668f.patch
>>>
>>>   Original Estimate: 2h
>>>  Remaining Estimate: 2h
>>>
>>> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.
>>> Here's why:  If something is wrong with the Mongo database server -- for example, if the server is offline -- it often takes a really long time (10 or more seconds) to fail and throw an exception.  This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data.
>>> Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc.
>>> I already have a patch that fixes this issue. The main gist of it is this. Change this:
>>> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));
>>> to this:
>>> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));
>>> Useful Resources:
>>> * PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php
>>
>> --
>> This message is automatically generated by JIRA.
>> If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>>
>
>
>
> --
> http://www.grobmeier.de
> https://www.timeandbill.de

Re: [jira] [Resolved] (LOG4PHP-166) LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.

Posted by Christian Grobmeier <gr...@gmail.com>.
Hi Ivan,

I can see: DEFAULT_TIMEOUT_VALUE
but I cannot see how it is used - so far it looks to me always 0 is
used in case no timeout has been specified

Cheers

On Thu, Dec 22, 2011 at 2:30 PM, Ivan Habunek (Resolved) (JIRA)
<ji...@apache.org> wrote:
>
>     [ https://issues.apache.org/jira/browse/LOG4PHP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Ivan Habunek resolved LOG4PHP-166.
> ----------------------------------
>
>       Resolution: Fixed
>    Fix Version/s: 2.3
>         Assignee: Ivan Habunek
>
> Thanks for the contribution. I have added the docs & tests for the new parameter. The code is in trunk and will be released in 2.3.
>
>> LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.
>> -------------------------------------------------------------------------------------------------------------------
>>
>>                 Key: LOG4PHP-166
>>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-166
>>             Project: Log4php
>>          Issue Type: Improvement
>>          Components: Code
>>    Affects Versions: 2.1, 2.2
>>            Reporter: David Hilowitz
>>            Assignee: Ivan Habunek
>>            Priority: Minor
>>             Fix For: 2.3
>>
>>         Attachments: patch_commit_59b06e94668f.patch
>>
>>   Original Estimate: 2h
>>  Remaining Estimate: 2h
>>
>> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.
>> Here's why:  If something is wrong with the Mongo database server -- for example, if the server is offline -- it often takes a really long time (10 or more seconds) to fail and throw an exception.  This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data.
>> Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc.
>> I already have a patch that fixes this issue. The main gist of it is this. Change this:
>> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));
>> to this:
>> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));
>> Useful Resources:
>> * PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>



-- 
http://www.grobmeier.de
https://www.timeandbill.de

[jira] [Resolved] (LOG4PHP-166) LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.

Posted by "Ivan Habunek (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Habunek resolved LOG4PHP-166.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3
         Assignee: Ivan Habunek

Thanks for the contribution. I have added the docs & tests for the new parameter. The code is in trunk and will be released in 2.3.
                
> LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4PHP-166
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-166
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1, 2.2
>            Reporter: David Hilowitz
>            Assignee: Ivan Habunek
>            Priority: Minor
>             Fix For: 2.3
>
>         Attachments: patch_commit_59b06e94668f.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 
> Here's why:  If something is wrong with the Mongo database server -- for example, if the server is offline -- it often takes a really long time (10 or more seconds) to fail and throw an exception.  This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 
> Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 
> I already have a patch that fixes this issue. The main gist of it is this. Change this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));
> to this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));
> Useful Resources:
> * PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (LOG4PHP-166) It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.

Posted by "David Hilowitz (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Hilowitz updated LOG4PHP-166:
-----------------------------------

    Description: 
It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 

Here's why:  If something is wrong with the Mongo database server, the server is offline or whatever, it often takes a long time (10 or more seconds) to fail and throw an exception. This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 

Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 

I already have a patch that fixes this issue. The main gist of it is this. Change this:

$this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));

to this:

$this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));

Useful Resources:

* PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php

  was:
It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 

Here's why:  If something is wrong with the Mongo database server, the server is offline or whatever, it often takes a long time (10 or more seconds) to fail and throw an exception. This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 

Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 

I already have a patch that fixes this issue. The main gist of it is this. Change this:

$this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));

to this:

$this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));

    
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4PHP-166
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-166
>             Project: Log4php
>          Issue Type: Improvement
>    Affects Versions: 2.1, 2.2
>            Reporter: David Hilowitz
>            Priority: Minor
>             Fix For: 2.3
>
>         Attachments: patch_commit_59b06e94668f.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 
> Here's why:  If something is wrong with the Mongo database server, the server is offline or whatever, it often takes a long time (10 or more seconds) to fail and throw an exception. This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 
> Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 
> I already have a patch that fixes this issue. The main gist of it is this. Change this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));
> to this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));
> Useful Resources:
> * PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (LOG4PHP-166) LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.

Posted by "Ivan Habunek (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174826#comment-13174826 ] 

Ivan Habunek commented on LOG4PHP-166:
--------------------------------------

That shows why code review is important. :)
I have fixed it now. Have another look please.
                
> LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4PHP-166
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-166
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1, 2.2
>            Reporter: David Hilowitz
>            Assignee: Ivan Habunek
>            Priority: Minor
>             Fix For: 2.3
>
>         Attachments: patch_commit_59b06e94668f.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 
> Here's why:  If something is wrong with the Mongo database server -- for example, if the server is offline -- it often takes a really long time (10 or more seconds) to fail and throw an exception.  This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 
> Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 
> I already have a patch that fixes this issue. The main gist of it is this. Change this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));
> to this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));
> Useful Resources:
> * PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (LOG4PHP-166) It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.

Posted by "David Hilowitz (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Hilowitz updated LOG4PHP-166:
-----------------------------------

    Attachment: patch_commit_59b06e94668f.patch

This is the patch I threw together to fix this issue.
                
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4PHP-166
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-166
>             Project: Log4php
>          Issue Type: Improvement
>    Affects Versions: 2.1, 2.2
>            Reporter: David Hilowitz
>            Priority: Minor
>             Fix For: 2.3
>
>         Attachments: patch_commit_59b06e94668f.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 
> Here's why:  If something is wrong with the Mongo database server, the server is offline or whatever, it often takes a long time (10 or more seconds) to fail and throw an exception. This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 
> Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 
> I already have a patch that fixes this issue. The main gist of it is this. Change this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));
> to this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (LOG4PHP-166) LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.

Posted by "David Hilowitz (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Hilowitz updated LOG4PHP-166:
-----------------------------------

      Component/s: Code
    Fix Version/s:     (was: 2.3)
      Description: 
It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 

Here's why:  If something is wrong with the Mongo database server -- for example, if the server is offline -- it often takes a really long time (10 or more seconds) to fail and throw an exception.  This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 

Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 

I already have a patch that fixes this issue. The main gist of it is this. Change this:

$this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));

to this:

$this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));

Useful Resources:

* PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php

  was:
It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 

Here's why:  If something is wrong with the Mongo database server, the server is offline or whatever, it often takes a long time (10 or more seconds) to fail and throw an exception. This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 

Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 

I already have a patch that fixes this issue. The main gist of it is this. Change this:

$this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));

to this:

$this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));

Useful Resources:

* PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php

          Summary: LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.  (was: It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.)
    
> LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4PHP-166
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-166
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1, 2.2
>            Reporter: David Hilowitz
>            Priority: Minor
>         Attachments: patch_commit_59b06e94668f.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 
> Here's why:  If something is wrong with the Mongo database server -- for example, if the server is offline -- it often takes a really long time (10 or more seconds) to fail and throw an exception.  This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 
> Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 
> I already have a patch that fixes this issue. The main gist of it is this. Change this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));
> to this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));
> Useful Resources:
> * PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (LOG4PHP-166) It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.

Posted by "David Hilowitz (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Hilowitz updated LOG4PHP-166:
-----------------------------------

    Comment: was deleted

(was: This patch changes src/main/php/appenders/LoggerAppenderMongoDB.php)
    
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4PHP-166
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-166
>             Project: Log4php
>          Issue Type: Improvement
>    Affects Versions: 2.1, 2.2
>            Reporter: David Hilowitz
>            Priority: Minor
>             Fix For: 2.3
>
>         Attachments: patch_commit_59b06e94668f.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 
> Here's why:  If something is wrong with the Mongo database server, the server is offline or whatever, it often takes a long time (10 or more seconds) to fail and throw an exception. This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 
> Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 
> I already have a patch that fixes this issue. The main gist of it is this. Change this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));
> to this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));
> Useful Resources:
> * PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (LOG4PHP-166) It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.

Posted by "David Hilowitz (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174467#comment-13174467 ] 

David Hilowitz edited comment on LOG4PHP-166 at 12/21/11 10:57 PM:
-------------------------------------------------------------------

This is the patch I threw together to fix this issue. This patch changes src/main/php/appenders/LoggerAppenderMongoDB.php only.
                
      was (Author: dhilowitz):
    This is the patch I threw together to fix this issue.
                  
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4PHP-166
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-166
>             Project: Log4php
>          Issue Type: Improvement
>    Affects Versions: 2.1, 2.2
>            Reporter: David Hilowitz
>            Priority: Minor
>             Fix For: 2.3
>
>         Attachments: patch_commit_59b06e94668f.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 
> Here's why:  If something is wrong with the Mongo database server, the server is offline or whatever, it often takes a long time (10 or more seconds) to fail and throw an exception. This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 
> Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 
> I already have a patch that fixes this issue. The main gist of it is this. Change this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));
> to this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));
> Useful Resources:
> * PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (LOG4PHP-166) LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.

Posted by "Ivan Habunek (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Habunek updated LOG4PHP-166:
---------------------------------

    Fix Version/s:     (was: 2.3.0)
                   2.2.1
    
> LoggerAppenderMongoDB should supply a timeout value to the Mongo() constructor when it connects for the first time.
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4PHP-166
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-166
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1.0, 2.2.0
>            Reporter: David Hilowitz
>            Assignee: Ivan Habunek
>            Priority: Minor
>             Fix For: 2.2.1
>
>         Attachments: patch_commit_59b06e94668f.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 
> Here's why:  If something is wrong with the Mongo database server -- for example, if the server is offline -- it often takes a really long time (10 or more seconds) to fail and throw an exception.  This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 
> Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 
> I already have a patch that fixes this issue. The main gist of it is this. Change this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));
> to this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));
> Useful Resources:
> * PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (LOG4PHP-166) It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.

Posted by "David Hilowitz (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174470#comment-13174470 ] 

David Hilowitz commented on LOG4PHP-166:
----------------------------------------

This patch changes src/main/php/appenders/LoggerAppenderMongoDB.php
                
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time.
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4PHP-166
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-166
>             Project: Log4php
>          Issue Type: Improvement
>    Affects Versions: 2.1, 2.2
>            Reporter: David Hilowitz
>            Priority: Minor
>             Fix For: 2.3
>
>         Attachments: patch_commit_59b06e94668f.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> It would be great if LoggerAppenderMongoDB could supply a timeout value to the Mongo() constructor when it connects for the first time. 
> Here's why:  If something is wrong with the Mongo database server, the server is offline or whatever, it often takes a long time (10 or more seconds) to fail and throw an exception. This is terrible in a situation where we need a quick turnaround time and are using the logger to collect diagnostic data. 
> Ideally, a timeout value could be specified in the log4php config XML file along with the host, name, etc. 
> I already have a patch that fixes this issue. The main gist of it is this. Change this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port));
> to this:
> $this->connection = new Mongo(sprintf('%s:%d', $this->host, $this->port), array("timeout" => $this->timeout));
> Useful Resources:
> * PHP Docs that explain the Mongo() constructor timeout value: http://php.net/manual/en/mongo.construct.php

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira