Actually, in this case saving the result of System.currentTimeMillis() directly
to the volatile field is fine.
I just have the habit of doing all the work on a temp variable before writing
to a volatile field. Or read from a volatile field into a temp variable and
then do all the work on the t
I saw you reverted the change. Thanks!
Take a look at the implementation for AtomicLong get() and set(). They just set
the value of the volatile long field of the AtomicLong instance. So we're just
adding unnecessary method invocations. True, hotspot may inline them, so the
result may be the sa
That must have been a lot of work. Thanks for putting that together!
I think the current version of the guidelines still has "no wildcart imports"
as a rule. We may want to change that pending our discussion on the other
thread.
Also interesting that Google recommends to use CamelCase for acro
We use Camel Case even for acronyms at work. SOAPHTTPRPCListener? Bleh!
Gary
Original message From: Remko Popma
Date:05/19/2014 04:19 (GMT-05:00)
To: Log4J Developers List
Subject: Re: Guidelines
That must have been a lot of work. Thanks for putting that together!
I thin
I didn't want to manage a pool but to do a fire and forget.
As for multiple recon figurations, I don't know of the top of my head. I don't
want to introduce locking here but I will see if that is a problem.
Sent from my iPad
> On May 19, 2014, at 4:15 AM, Gary Gregory wrote:
>
> Does this gua
I've been getting random failures in RollingAppenderTimeTest.testAppender
over the last couple of days:
Failed tests:
RollingAppenderTimeTest.testAppender:81 No compressed files found
Could this be related to the shortening of Thread sleeps and other test
'speedups'?
Gary
--
E-Mail: garydgre
I believe this should be fixed in the latest code. If it isn't, yes it is
related.
Ralph
> On May 19, 2014, at 5:26 AM, Gary Gregory wrote:
>
> I've been getting random failures in RollingAppenderTimeTest.testAppender
> over the last couple of days:
>
> Failed tests:
> RollingAppenderTimeT
Good call. I'm so used to making code thread-safe in a non-performance
critical enterprise where not many programmers understand concurrency at
all. I guess I need to update my IntelliJ inspection settings to modernise
them a bit!
On 19 May 2014 02:25, Remko Popma wrote:
> I saw you reverted th
Thread pool thing is pretty simple and fire-and-forget if you want to:
Executors.newSingleThreadExecutor().submit(someRunnable);
But it'd be a good idea to save the ExecutorService it returns for later
re-use. :)
On 19 May 2014 07:22, Ralph Goers wrote:
> I didn't want to manage a pool but to
There's only one type of acceptable all-caps class name: URL/URI and the
like. I do indeed prefer CamelClassFactoryUrlBuilders myself.
On 19 May 2014 06:35, Gary Gregory wrote:
> We use Camel Case even for acronyms at work. SOAPHTTPRPCListener? Bleh!
>
> Gary
>
>
> Original message ---
I don't think you meant camel case -- but Title Case. This would be
camelCase.
Cheers,
Paul
On Mon, May 19, 2014 at 8:31 AM, Matt Sicker wrote:
> There's only one type of acceptable all-caps class name: URL/URI and the
> like. I do indeed prefer CamelClassFactoryUrlBuilders myself.
>
>
> On 1
I get that occasionally, too. Is this related:
http://ci.apache.org/builders/log4j2-nightly/builds/8/steps/compile/logs/stdio
On 19 May 2014 07:33, Ralph Goers wrote:
> I believe this should be fixed in the latest code. If it isn't, yes it is
> related.
>
> Ralph
>
> On May 19, 2014, at 5:26 AM
True. I also enjoy the lisp-style/abuse.all.the^symbols names, but
non-lisps don't like that. ;)
On 19 May 2014 08:34, Paul Benedict wrote:
> I don't think you meant camel case -- but Title Case. This would be
> camelCase.
>
>
> Cheers,
> Paul
>
>
> On Mon, May 19, 2014 at 8:31 AM, Matt Sicker
Tangent: the link does not work with the EFF's HTTPS Everywhere add-on
because the CI server is not enabled for HTTPS.
Gary
On Mon, May 19, 2014 at 9:35 AM, Matt Sicker wrote:
> I get that occasionally, too. Is this related:
>
> http://ci.apache.org/builders/log4j2-nightly/builds/8/steps/compi
On Mon, May 19, 2014 at 9:55 AM, Gary Gregory wrote:
> Tangent: the link does not work with the EFF's HTTPS Everywhere add-on
> because the CI server is not enabled for HTTPS.
>
FYI, I created https://issues.apache.org/jira/browse/INFRA-7762
Gary
>
> Gary
>
>
> On Mon, May 19, 2014 at 9:35 AM,
On Mon, May 19, 2014 at 9:57 AM, Gary Gregory wrote:
> On Mon, May 19, 2014 at 9:55 AM, Gary Gregory wrote:
>
>> Tangent: the link does not work with the EFF's HTTPS Everywhere add-on
>> because the CI server is not enabled for HTTPS.
>>
>
> FYI, I created https://issues.apache.org/jira/browse/INF
RollingAppenderTimeTest was fixed recently so this should not happen
anymore.
Can you give a shout if it happens again? That would indicate that the fix
did not work...
On Mon, May 19, 2014 at 10:58 PM, Gary Gregory wrote:
> On Mon, May 19, 2014 at 9:57 AM, Gary Gregory wrote:
>
>> On Mon, May 1
Currently Log4jLogEvent creates a ThrowableProxy in the constructor (if
Throwable is non-null). I would like to construct
the ThrowableProxy lazily: only if the Log4jLogEvent is serialized or if
its getThrowableProxy method is called. (Already did this for
RingBufferLogEvent.)
Does anyone have an
I looked at the code. It is currently holding a lock while it checks the file
timestamp, so no it can’t be reconfigured twice. However, the performance
could probably be improved by using double-checked locking instead.
Ralph
On May 19, 2014, at 5:22 AM, Ralph Goers wrote:
> I didn't want t
Related thoughts and issues:
That means the proxy cannot be final and that the event needs to track both
the proxy AND the throwable...
Note that there are cases where events are non-local, that is, when they
are deserialized from another class loader or another JVM (from a
Serialized object , XM
Just because I was curious, how did you test this or how are you using it?
Developers of Java are pretty convinced that ArrayDeque is faster than a Stack
in most situations.
Snippet from the java doc for ArrayDeque:
This class is likely to be faster than
* {@link Stack} when used as a st
It would be cool to add Ralph's tests to our new perf test category.
It's always interesting to see what happens on different JVMs and different
versions...
Gary
On Mon, May 19, 2014 at 10:49 AM, Kurt Lehrke wrote:
> Just because I was curious, how did you test this or how are you using
> it
I will have to dig them up. I tested this probably two years ago. The tests
were probably pretty basic.
Ralph
On May 19, 2014, at 7:49 AM, Kurt Lehrke wrote:
> Just because I was curious, how did you test this or how are you using it?
> Developers of Java are pretty convinced that ArrayDequ
Here is another 'random' failure:
Failed tests:
RollingAppenderTimeTest.testAppender:81 No compressed files found
Tests in error:
TLSSyslogAppenderTest.:43->initServerSocketFactory:86 ╗ Unresolved
comp...
TLSSyslogAppenderTest.:43->initServerSocketFactory:86 ╗ Unresolved
comp...
TLSSysl
[
https://issues.apache.org/jira/browse/LOG4J2-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Wehner closed LOG4J2-620.
> Deadlock on reconfiguration with Appenders that use log4j
> -
[
https://issues.apache.org/jira/browse/LOG4J2-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14001973#comment-14001973
]
Stefan Wehner commented on LOG4J2-620:
--
Yep - the sample app seems to work now! Thank
All:
I abstracted out the life cycle management code out of LoggerContext into
it's own abstract class and reused it in (now) subclasses that provided the
same kind of functionality (please see revision 1596001.)
The next question is: The AbstractAppender extends AbstractFilterable and
also has l
I get logs from users that are files, which is nice.
I'd like the log to have a line that shows the conversion pattern used to
create the log events.
This would let me create a nice color filter in our tools.
Yes, I know users could use some kind of structured appender in addition to
a log file,
Gary, maybe log4j could spit out some of its own configuration information
into the logs when it starts up? Set DEBUG for a certain log4j class --
what a cool enhancement.
Cheers,
Paul
On Mon, May 19, 2014 at 2:47 PM, Gary Gregory wrote:
> I get logs from users that are files, which is nice.
>
I've updated the test to wait longer, have more iterations, and add
additional events in the log while iterating.
Please let me know if the issue still occurs.
On Tue, May 20, 2014 at 1:10 AM, Gary Gregory wrote:
> Here is another 'random' failure:
>
>
> Failed tests:
> RollingAppenderTimeTest
So, do we have consensus now?
* Wildcarts are allowed in static imports, only for junit.Assert, EasyMock
and hamcrest.CoreMatchers.
* Static imports come after normal imports
* imports are sorted java > javax > com > org
On Mon, May 19, 2014 at 9:51 AM, Remko Popma wrote:
> Just those 3 is f
On Mon, May 19, 2014 at 11:42 PM, Gary Gregory wrote:
> Related thoughts and issues:
>
> That means the proxy cannot be final and that the event needs to track
> both the proxy AND the throwable...
>
That is correct. That is how it is done in RingBufferLogEvent.
>
> Note that there are cases whe
Are there any Eclipse settings that I can just import that match all the
various code formatting rules that we have for this project? If not, would
there be value in creating these settings so we can share them?
I've really grown attached to having Eclipse just auto-format my code when
I save and
I think there is a Jira about that. I have a feeling that there are more
classes that should use LifeCycle but don’t and do their initialization a
little differently, but it would require going and looking through all the
classes to determine that.
Ralph
On May 19, 2014, at 12:37 PM, Gary Gre
Almost:
* imports are sorted java > javax > *org** > com*
Gary
On Mon, May 19, 2014 at 6:39 PM, Remko Popma wrote:
> So, do we have consensus now?
>
> * Wildcarts are allowed in static imports, only for junit.Assert, EasyMock
> and hamcrest.CoreMatchers.
> * Static imports come after normal im
Please see
https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/src/ide
where you will find Eclipse and IJ settings for organizing imports.
Gary
On Mon, May 19, 2014 at 8:56 PM, Bruce Brouwer wrote:
> Are there any Eclipse settings that I can just import that match all the
> various co
Let's start with a specific case: AbstractAppender clearly has life cycle
features (start/stop) but it subclasses AbstractFilterable.
Would it be correct for AbstractFilterable to be a life cycle and subclass
AbstractLifeCycle?
Gary
On Mon, May 19, 2014 at 9:29 PM, Ralph Goers wrote:
> I think
It sounds like you want that in the header of the file? That sounds like an
extension of what PatternLayout currently does. You would just want to set the
header to include the pattern. Of course, this doesn’t apply to Appenders that
use some other layout.
Ralph
On May 19, 2014, at 12:47 PM,
+1
Ralph
On May 19, 2014, at 3:39 PM, Remko Popma wrote:
> So, do we have consensus now?
>
> * Wildcarts are allowed in static imports, only for junit.Assert, EasyMock
> and hamcrest.CoreMatchers.
> * Static imports come after normal imports
> * imports are sorted java > javax > com > org
>
On Mon, May 19, 2014 at 9:34 PM, Gary Gregory wrote:
> Let's start with a specific case: AbstractAppender clearly has life cycle
> features (start/stop) but it subclasses AbstractFilterable.
>
> Would it be correct for AbstractFilterable to be a life cycle and subclass
> AbstractLifeCycle?
>
Let
On Mon, May 19, 2014 at 9:37 PM, Ralph Goers wrote:
> It sounds like you want that in the header of the file? That sounds like
> an extension of what PatternLayout currently does. You would just want to
> set the header to include the pattern. Of course, this doesn’t apply to
> Appenders that us
OK, so I will plan on doing a commit with these new settings unless someone
else chimes in soon. Let's say by tomorrow AM (I am US EST).
Gary
On Mon, May 19, 2014 at 9:38 PM, Ralph Goers wrote:
> +1
>
> Ralph
>
> On May 19, 2014, at 3:39 PM, Remko Popma wrote:
>
> So, do we have consensus now?
Being an Eclipse user myself, I have always seen the formatter put the
static imports at the top. I don't think there is an option to put them at
the bottom.
Cheers,
Paul
On Mon, May 19, 2014 at 8:43 PM, Gary Gregory wrote:
> OK, so I will plan on doing a commit with these new settings unless
So, I haven't forgotten about this item. There are a number of other issues
that this current solution suffers from. Issues that other features of
log4j already solves.
1) If writing status logs to a file, what if I want a different encoding
than the system default?
2) What if this log file starts
Right
On May 19, 2014, at 6:30 PM, Gary Gregory wrote:
> Almost:
>
> * imports are sorted java > javax > org > com
>
> Gary
>
> On Mon, May 19, 2014 at 6:39 PM, Remko Popma wrote:
> So, do we have consensus now?
>
> * Wildcarts are allowed in static imports, only for junit.Assert, EasyMock
Right what?
G
On Mon, May 19, 2014 at 11:08 PM, Ralph Goers wrote:
> Right
>
> On May 19, 2014, at 6:30 PM, Gary Gregory wrote:
>
> Almost:
>
> * imports are sorted java > javax > *org** > com*
>
> Gary
>
> On Mon, May 19, 2014 at 6:39 PM, Remko Popma wrote:
>
>> So, do we have consensus now?
Yes, but it will be a bit of a chore. The following classes extend
AbstractFilterable.
1. AbstractConfiguration already has start and stop methods so should implement
LifeCycle. However, it also uses a setup method which isn’t part of Lifecycle
but that should be OK the way it is.
2. LoggerCon
Give me commit rights and I'll do it. (I believe that is in the works)
On Sun, May 18, 2014 at 9:31 PM, Gary Gregory wrote:
> Any volunteers to remove org.apache.logging.log4j.Marker.getParent() ?
> :-)
> Gary
>
> --
> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
> Java Persistence with
StatusLogger isn’t meant to be a full blown logging system. It is a tool to
diagnose problems in Log4j or the configuration. So my opinion is that all of
these are not things to lose sleep over. To be honest I never really
considered logging to anything but stdout for this stuff and letting To
As in you are correct.
On May 19, 2014, at 8:12 PM, Gary Gregory wrote:
> Right what?
>
> G
>
>
> On Mon, May 19, 2014 at 11:08 PM, Ralph Goers
> wrote:
> Right
>
> On May 19, 2014, at 6:30 PM, Gary Gregory wrote:
>
>> Almost:
>>
>> * imports are sorted java > javax > org > com
>>
>> G
sivan created LOG4J2-642:
Summary: Mismatch in Rollback date and log entry date in the log
file
Key: LOG4J2-642
URL: https://issues.apache.org/jira/browse/LOG4J2-642
Project: Log4j 2
Issue Type: Bug
[
https://issues.apache.org/jira/browse/LOG4J2-642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Remko Popma updated LOG4J2-642:
---
Description:
This is an issue with the rollbacking of the log file. The file is rollbacked
as inst4-
[
https://issues.apache.org/jira/browse/LOG4J2-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14002827#comment-14002827
]
Remko Popma commented on LOG4J2-642:
Quick thing to try: replace your {{filePattern}}
[
https://issues.apache.org/jira/browse/LOG4J2-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14002850#comment-14002850
]
Ralph Goers commented on LOG4J2-642:
Remko, that won't work. There has to be a %date f
[
https://issues.apache.org/jira/browse/LOG4J2-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14002872#comment-14002872
]
sivan commented on LOG4J2-642:
--
For example out-2014-05-18 file contains full of log entries
55 matches
Mail list logo