[jira] [Commented] (LOG4J2-628) Cannot set log4j.Clock with Async appender
[ https://issues.apache.org/jira/browse/LOG4J2-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13990631#comment-13990631 ] Remko Popma commented on LOG4J2-628: Bryan, SocketServer has been refactored and renamed to AbstractSocketServer in the same (core.net) package. The error message you mention has been modified to an info-level message yesterday. If you check out trunk again the error should go away. Cannot set log4j.Clock with Async appender -- Key: LOG4J2-628 URL: https://issues.apache.org/jira/browse/LOG4J2-628 Project: Log4j 2 Issue Type: Question Components: Appenders Affects Versions: 2.0-rc1 Environment: Ubuntu 12.04 / Java 7 Reporter: Bryan Hsueh Assignee: Remko Popma Fix For: 2.0-rc2 I override log4j.Clock to support a live time vs a simulated time. System.setProperty(log4j.Clock, teambh.trade.utils.MyClock); If I use asynchronous loggers, it works fine and calls my Clock:currentTimeMillis(). If I switch to async appenders, currentTimeMillis() is not called. Is this expected behavior or a bug? Thanks -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org
[jira] [Commented] (LOG4J2-628) Cannot set log4j.Clock with Async appender
[ https://issues.apache.org/jira/browse/LOG4J2-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13989899#comment-13989899 ] Bryan Hsueh commented on LOG4J2-628: Tested, and works, thanks. I see this message log 7 times at the start though, ERROR StatusLogger Unable to locate ServletContext. Does this have to do with my build process? Likewise, I can no longer find SocketServer. I pulled your revision from github and followed the build instructions. Cannot set log4j.Clock with Async appender -- Key: LOG4J2-628 URL: https://issues.apache.org/jira/browse/LOG4J2-628 Project: Log4j 2 Issue Type: Question Components: Appenders Affects Versions: 2.0-rc1 Environment: Ubuntu 12.04 / Java 7 Reporter: Bryan Hsueh Assignee: Remko Popma Fix For: 2.0-rc2 I override log4j.Clock to support a live time vs a simulated time. System.setProperty(log4j.Clock, teambh.trade.utils.MyClock); If I use asynchronous loggers, it works fine and calls my Clock:currentTimeMillis(). If I switch to async appenders, currentTimeMillis() is not called. Is this expected behavior or a bug? Thanks -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org
[jira] [Commented] (LOG4J2-628) Cannot set log4j.Clock with Async appender
[ https://issues.apache.org/jira/browse/LOG4J2-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13990093#comment-13990093 ] Remko Popma commented on LOG4J2-628: Bryan, good to hear that. About the error, we are currently refactoring the code base to move web stuff into a separate module (and separate jar). Apparently there are still issues with that. Cannot set log4j.Clock with Async appender -- Key: LOG4J2-628 URL: https://issues.apache.org/jira/browse/LOG4J2-628 Project: Log4j 2 Issue Type: Question Components: Appenders Affects Versions: 2.0-rc1 Environment: Ubuntu 12.04 / Java 7 Reporter: Bryan Hsueh Assignee: Remko Popma Fix For: 2.0-rc2 I override log4j.Clock to support a live time vs a simulated time. System.setProperty(log4j.Clock, teambh.trade.utils.MyClock); If I use asynchronous loggers, it works fine and calls my Clock:currentTimeMillis(). If I switch to async appenders, currentTimeMillis() is not called. Is this expected behavior or a bug? Thanks -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org
[jira] [Commented] (LOG4J2-628) Cannot set log4j.Clock with Async appender
[ https://issues.apache.org/jira/browse/LOG4J2-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13988595#comment-13988595 ] Bryan Hsueh commented on LOG4J2-628: Sorry, I don't use the RolloverAppender, so I'll have to defer to your comments here. Thanks. Cannot set log4j.Clock with Async appender -- Key: LOG4J2-628 URL: https://issues.apache.org/jira/browse/LOG4J2-628 Project: Log4j 2 Issue Type: Question Components: Appenders Affects Versions: 2.0-rc1 Environment: Ubuntu 12.04 / Java 7 Reporter: Bryan Hsueh Assignee: Remko Popma I override log4j.Clock to support a live time vs a simulated time. System.setProperty(log4j.Clock, teambh.trade.utils.MyClock); If I use asynchronous loggers, it works fine and calls my Clock:currentTimeMillis(). If I switch to async appenders, currentTimeMillis() is not called. Is this expected behavior or a bug? Thanks -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org
[jira] [Commented] (LOG4J2-628) Cannot set log4j.Clock with Async appender
[ https://issues.apache.org/jira/browse/LOG4J2-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13988426#comment-13988426 ] Remko Popma commented on LOG4J2-628: Understood. We are thinking about modifying log4j to use the Clock interface to generate timestamps for all log events, not just the log events generated by Async Loggers. Question: do you also want to use that Clock interface to determine the rollover time in the RolloverAppender? Cannot set log4j.Clock with Async appender -- Key: LOG4J2-628 URL: https://issues.apache.org/jira/browse/LOG4J2-628 Project: Log4j 2 Issue Type: Question Components: Appenders Affects Versions: 2.0-rc1 Environment: Ubuntu 12.04 / Java 7 Reporter: Bryan Hsueh Assignee: Remko Popma I override log4j.Clock to support a live time vs a simulated time. System.setProperty(log4j.Clock, teambh.trade.utils.MyClock); If I use asynchronous loggers, it works fine and calls my Clock:currentTimeMillis(). If I switch to async appenders, currentTimeMillis() is not called. Is this expected behavior or a bug? Thanks -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org
[jira] [Commented] (LOG4J2-628) Cannot set log4j.Clock with Async appender
[ https://issues.apache.org/jira/browse/LOG4J2-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13988510#comment-13988510 ] Ralph Goers commented on LOG4J2-628: I don't think using a fictional clock will work out to well when rolling over files as the file will have a time stamp set by the OS. Cannot set log4j.Clock with Async appender -- Key: LOG4J2-628 URL: https://issues.apache.org/jira/browse/LOG4J2-628 Project: Log4j 2 Issue Type: Question Components: Appenders Affects Versions: 2.0-rc1 Environment: Ubuntu 12.04 / Java 7 Reporter: Bryan Hsueh Assignee: Remko Popma I override log4j.Clock to support a live time vs a simulated time. System.setProperty(log4j.Clock, teambh.trade.utils.MyClock); If I use asynchronous loggers, it works fine and calls my Clock:currentTimeMillis(). If I switch to async appenders, currentTimeMillis() is not called. Is this expected behavior or a bug? Thanks -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org
[jira] [Commented] (LOG4J2-628) Cannot set log4j.Clock with Async appender
[ https://issues.apache.org/jira/browse/LOG4J2-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13988580#comment-13988580 ] Remko Popma commented on LOG4J2-628: I agree. Also, using the Clock interface for rollover would introduce some interesting scenarios like the clock going back in time etc that the rollover logic was not designed for. It may work, but I would prefer to keep the scope of this change limited to just the log event timestamps for now. Cannot set log4j.Clock with Async appender -- Key: LOG4J2-628 URL: https://issues.apache.org/jira/browse/LOG4J2-628 Project: Log4j 2 Issue Type: Question Components: Appenders Affects Versions: 2.0-rc1 Environment: Ubuntu 12.04 / Java 7 Reporter: Bryan Hsueh Assignee: Remko Popma I override log4j.Clock to support a live time vs a simulated time. System.setProperty(log4j.Clock, teambh.trade.utils.MyClock); If I use asynchronous loggers, it works fine and calls my Clock:currentTimeMillis(). If I switch to async appenders, currentTimeMillis() is not called. Is this expected behavior or a bug? Thanks -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org
[jira] [Commented] (LOG4J2-628) Cannot set log4j.Clock with Async appender
[ https://issues.apache.org/jira/browse/LOG4J2-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13986881#comment-13986881 ] Bryan Hsueh commented on LOG4J2-628: Correct, my use case is not performance related. Instead, I implement Clock so that I can decide whether to use System time or my own artificial, simulated time. I am simulating a program against historical data. So, when I run historically, I want to see my historical timestamp. When I run live, I want to see the System timestamp. My Clock:currentTimeMillis() decides this for me. Cannot set log4j.Clock with Async appender -- Key: LOG4J2-628 URL: https://issues.apache.org/jira/browse/LOG4J2-628 Project: Log4j 2 Issue Type: Question Components: Appenders Affects Versions: 2.0-rc1 Environment: Ubuntu 12.04 / Java 7 Reporter: Bryan Hsueh I override log4j.Clock to support a live time vs a simulated time. System.setProperty(log4j.Clock, teambh.trade.utils.MyClock); If I use asynchronous loggers, it works fine and calls my Clock:currentTimeMillis(). If I switch to async appenders, currentTimeMillis() is not called. Is this expected behavior or a bug? Thanks -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org
Re: [jira] [Commented] (LOG4J2-628) Cannot set log4j.Clock with Async appender
If we used Clock consistently throughout, does this make sense to use everywhere? We use the clock to determine thread killing timeouts for instance. There are other places time is used that if it were to use the Clock interface, we'd have to document the contract required to be followed by it in order to not make everything blow up in a mess of concurrency problems. On 1 May 2014 14:09, Bryan Hsueh (JIRA) j...@apache.org wrote: [ https://issues.apache.org/jira/browse/LOG4J2-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13986881#comment-13986881] Bryan Hsueh commented on LOG4J2-628: Correct, my use case is not performance related. Instead, I implement Clock so that I can decide whether to use System time or my own artificial, simulated time. I am simulating a program against historical data. So, when I run historically, I want to see my historical timestamp. When I run live, I want to see the System timestamp. My Clock:currentTimeMillis() decides this for me. Cannot set log4j.Clock with Async appender -- Key: LOG4J2-628 URL: https://issues.apache.org/jira/browse/LOG4J2-628 Project: Log4j 2 Issue Type: Question Components: Appenders Affects Versions: 2.0-rc1 Environment: Ubuntu 12.04 / Java 7 Reporter: Bryan Hsueh I override log4j.Clock to support a live time vs a simulated time. System.setProperty(log4j.Clock, teambh.trade.utils.MyClock); If I use asynchronous loggers, it works fine and calls my Clock:currentTimeMillis(). If I switch to async appenders, currentTimeMillis() is not called. Is this expected behavior or a bug? Thanks -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org -- Matt Sicker boa...@gmail.com
Re: [jira] [Commented] (LOG4J2-628) Cannot set log4j.Clock with Async appender
Matt, can you make this a Jira comment? Not sure Bryan is on this list I'd prefer to have the full discussion either in the Jira comments or on the list: half-half will be confusing... Sent from my iPhone On 2014/05/02, at 5:19, Matt Sicker boa...@gmail.com wrote: If we used Clock consistently throughout, does this make sense to use everywhere? We use the clock to determine thread killing timeouts for instance. There are other places time is used that if it were to use the Clock interface, we'd have to document the contract required to be followed by it in order to not make everything blow up in a mess of concurrency problems. On 1 May 2014 14:09, Bryan Hsueh (JIRA) j...@apache.org wrote: [ https://issues.apache.org/jira/browse/LOG4J2-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13986881#comment-13986881 ] Bryan Hsueh commented on LOG4J2-628: Correct, my use case is not performance related. Instead, I implement Clock so that I can decide whether to use System time or my own artificial, simulated time. I am simulating a program against historical data. So, when I run historically, I want to see my historical timestamp. When I run live, I want to see the System timestamp. My Clock:currentTimeMillis() decides this for me. Cannot set log4j.Clock with Async appender -- Key: LOG4J2-628 URL: https://issues.apache.org/jira/browse/LOG4J2-628 Project: Log4j 2 Issue Type: Question Components: Appenders Affects Versions: 2.0-rc1 Environment: Ubuntu 12.04 / Java 7 Reporter: Bryan Hsueh I override log4j.Clock to support a live time vs a simulated time. System.setProperty(log4j.Clock, teambh.trade.utils.MyClock); If I use asynchronous loggers, it works fine and calls my Clock:currentTimeMillis(). If I switch to async appenders, currentTimeMillis() is not called. Is this expected behavior or a bug? Thanks -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org -- Matt Sicker boa...@gmail.com
Re: [jira] [Commented] (LOG4J2-628) Cannot set log4j.Clock with Async appender
Actually, Matt, I take that back with apologies. I'll start a discussion thread on the dev list. The Jira can be focussed on the user requirements. On Fri, May 2, 2014 at 7:02 AM, Remko Popma remko.po...@gmail.com wrote: Matt, can you make this a Jira comment? Not sure Bryan is on this list I'd prefer to have the full discussion either in the Jira comments or on the list: half-half will be confusing... Sent from my iPhone On 2014/05/02, at 5:19, Matt Sicker boa...@gmail.com wrote: If we used Clock consistently throughout, does this make sense to use everywhere? We use the clock to determine thread killing timeouts for instance. There are other places time is used that if it were to use the Clock interface, we'd have to document the contract required to be followed by it in order to not make everything blow up in a mess of concurrency problems. On 1 May 2014 14:09, Bryan Hsueh (JIRA) j...@apache.org wrote: [ https://issues.apache.org/jira/browse/LOG4J2-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13986881#comment-13986881] Bryan Hsueh commented on LOG4J2-628: Correct, my use case is not performance related. Instead, I implement Clock so that I can decide whether to use System time or my own artificial, simulated time. I am simulating a program against historical data. So, when I run historically, I want to see my historical timestamp. When I run live, I want to see the System timestamp. My Clock:currentTimeMillis() decides this for me. Cannot set log4j.Clock with Async appender -- Key: LOG4J2-628 URL: https://issues.apache.org/jira/browse/LOG4J2-628 Project: Log4j 2 Issue Type: Question Components: Appenders Affects Versions: 2.0-rc1 Environment: Ubuntu 12.04 / Java 7 Reporter: Bryan Hsueh I override log4j.Clock to support a live time vs a simulated time. System.setProperty(log4j.Clock, teambh.trade.utils.MyClock); If I use asynchronous loggers, it works fine and calls my Clock:currentTimeMillis(). If I switch to async appenders, currentTimeMillis() is not called. Is this expected behavior or a bug? Thanks -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org -- Matt Sicker boa...@gmail.com
[jira] [Commented] (LOG4J2-628) Cannot set log4j.Clock with Async appender
[ https://issues.apache.org/jira/browse/LOG4J2-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13986246#comment-13986246 ] Remko Popma commented on LOG4J2-628: This is expected behaviour as of RC-1. The use case for the Clock interface was to allow an extra performance optimization for users who want to squeeze the last drop of performance out of the logging subsystem. The trade-off is that the faster CachedClock implementation shows jumps of 10-16 milliseconds, so you lose accuracy in the log timestamps. However this optimization only becomes visible after other bottlenecks have been removed. The performance bottleneck of Async appender is on the queue, and optimizing the timestamping mechanism would not make a visible difference in performance. If your use case for using a custom Clock is not performance related, can you clarify what it is you are trying to achieve? Perhaps it would make sense to use the Clock interface consistently everywhere in Log4j. Cannot set log4j.Clock with Async appender -- Key: LOG4J2-628 URL: https://issues.apache.org/jira/browse/LOG4J2-628 Project: Log4j 2 Issue Type: Question Components: Appenders Affects Versions: 2.0-rc1 Environment: Ubuntu 12.04 / Java 7 Reporter: Bryan Hsueh I override log4j.Clock to support a live time vs a simulated time. System.setProperty(log4j.Clock, teambh.trade.utils.MyClock); If I use asynchronous loggers, it works fine and calls my Clock:currentTimeMillis(). If I switch to async appenders, currentTimeMillis() is not called. Is this expected behavior or a bug? Thanks -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org