You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@logging.apache.org by Andrus Adamchik <aa...@apache.org> on 2013/03/18 13:09:32 UTC

Mirroring Log4J 2 on GitHub

Hey guys,

There's a Log4J mirror on GitHub at https://github.com/apache/log4j . Would it be possible to also mirror Log4J2? 

We've recently switched to Log4J2 on one of the big projects that I am doing. Now we need to patch a few things for our work in a way that is likely not going to be accepted back to Log4J. Specifically we want to short-circuit Log4jLogEvent.getSource to return a fixed String. We are using AsynchAppender and 'Log4jLogEvent.getSource' is a noticeable performance bottleneck for us, and we currently don't see a better way around it (ok, to be completely honest, we just don't have the cycles to refactor Log4J2 properly). So the idea was to keep a GitHub fork and merge periodically with the master copy.

Any thoughts/comments on exposing "2" on GitHub. 

As an Apache member I can probably ping infra myself. But wanted to talk to the 'logging' community first.

Thanks,
Andrus

Re: Mirroring Log4J 2 on GitHub

Posted by Ivan Habunek <iv...@gmail.com>.
On 18 March 2013 14:06, Christian Grobmeier <gr...@gmail.com> wrote:
> +1 on the GitHub mirror.
> If you would like to push this on infra side, I believe nobody of us
> has a problem with it - just go ahead.

+1
Knock yoursef out. :)

Ivan

Re: Mirroring Log4J 2 on GitHub

Posted by Christian Grobmeier <gr...@gmail.com>.
+1 on the GitHub mirror.
If you would like to push this on infra side, I believe nobody of us
has a problem with it - just go ahead.


On Mon, Mar 18, 2013 at 1:09 PM, Andrus Adamchik <aa...@apache.org> wrote:
> Hey guys,
>
> There's a Log4J mirror on GitHub at https://github.com/apache/log4j . Would it be possible to also mirror Log4J2?
>
> We've recently switched to Log4J2 on one of the big projects that I am doing. Now we need to patch a few things for our work in a way that is likely not going to be accepted back to Log4J. Specifically we want to short-circuit Log4jLogEvent.getSource to return a fixed String. We are using AsynchAppender and 'Log4jLogEvent.getSource' is a noticeable performance bottleneck for us, and we currently don't see a better way around it (ok, to be completely honest, we just don't have the cycles to refactor Log4J2 properly). So the idea was to keep a GitHub fork and merge periodically with the master copy.
>
> Any thoughts/comments on exposing "2" on GitHub.
>
> As an Apache member I can probably ping infra myself. But wanted to talk to the 'logging' community first.
>
> Thanks,
> Andrus



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

Re: Mirroring Log4J 2 on GitHub

Posted by Ralph Goers <ra...@dslextreme.com>.
Also, would you mind creating a Jira issue for the getSource problem.  We have a contributor who is working heavily on async stuff who has also pointed this out and it would make sense to make that pluggable.

Ralph

On Mar 18, 2013, at 9:27 AM, Ralph Goers wrote:

> What would it take to make git primary instead of a mirror?
> 
> Ralph
> 
> 
> On Mar 18, 2013, at 5:09 AM, Andrus Adamchik wrote:
> 
>> Hey guys,
>> 
>> There's a Log4J mirror on GitHub at https://github.com/apache/log4j . Would it be possible to also mirror Log4J2? 
>> 
>> We've recently switched to Log4J2 on one of the big projects that I am doing. Now we need to patch a few things for our work in a way that is likely not going to be accepted back to Log4J. Specifically we want to short-circuit Log4jLogEvent.getSource to return a fixed String. We are using AsynchAppender and 'Log4jLogEvent.getSource' is a noticeable performance bottleneck for us, and we currently don't see a better way around it (ok, to be completely honest, we just don't have the cycles to refactor Log4J2 properly). So the idea was to keep a GitHub fork and merge periodically with the master copy.
>> 
>> Any thoughts/comments on exposing "2" on GitHub. 
>> 
>> As an Apache member I can probably ping infra myself. But wanted to talk to the 'logging' community first.
>> 
>> Thanks,
>> Andrus
> 


Re: Mirroring Log4J 2 on GitHub

Posted by Gary Gregory <ga...@gmail.com>.
On Mon, Mar 18, 2013 at 12:27 PM, Ralph Goers <ra...@dslextreme.com>wrote:

> What would it take to make git primary instead of a mirror?
>

I think we just have to ask infra?

G


>
> Ralph
>
>
> On Mar 18, 2013, at 5:09 AM, Andrus Adamchik wrote:
>
> > Hey guys,
> >
> > There's a Log4J mirror on GitHub at https://github.com/apache/log4j .
> Would it be possible to also mirror Log4J2?
> >
> > We've recently switched to Log4J2 on one of the big projects that I am
> doing. Now we need to patch a few things for our work in a way that is
> likely not going to be accepted back to Log4J. Specifically we want to
> short-circuit Log4jLogEvent.getSource to return a fixed String. We are
> using AsynchAppender and 'Log4jLogEvent.getSource' is a noticeable
> performance bottleneck for us, and we currently don't see a better way
> around it (ok, to be completely honest, we just don't have the cycles to
> refactor Log4J2 properly). So the idea was to keep a GitHub fork and merge
> periodically with the master copy.
> >
> > Any thoughts/comments on exposing "2" on GitHub.
> >
> > As an Apache member I can probably ping infra myself. But wanted to talk
> to the 'logging' community first.
> >
> > Thanks,
> > Andrus
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Mirroring Log4J 2 on GitHub

Posted by Ivan Habunek <iv...@gmail.com>.
On 18 March 2013 19:08, Gary Gregory <ga...@gmail.com> wrote:
> But you do not have to do it that way right? We could keep master to be the
> same as trunk.

Sure, whatever floats your boat. :) Nothing is preventing you from
forming own your workflow.

Regards,
Ivan

Re: Mirroring Log4J 2 on GitHub

Posted by Christian Grobmeier <gr...@gmail.com>.
On Mon, Mar 18, 2013 at 7:08 PM, Gary Gregory <ga...@gmail.com> wrote:
> But you do not have to do it that way right? We could keep master to be the
> same as trunk.

I agree with Ivan this is possible. I thought similar like you before
two years. But actually I have meanwhile learned to value the workflow
described here:
http://nvie.com/posts/a-successful-git-branching-model/

Its great to work with branches, because you can commit even when it
is a half finished feature. You would commit to a feature branch. When
the feature branch is done you would bring it into the develop branch.
Meanwhile I love feature branches. The separation from develop to
master makes sense, esp when you want to create a hotfix. You could
create a hotfix branch directly from the master, make the fix and
finally release from hotfix and merge back to master.

One should also mention that it is pretty common to delete branches
when they are not longer of use.

That said, I have had a couple of merge conflicts in the past, but
they were all better to resolve than with svn. Git is not the solution
for everything, but it is definitely giving some more cool mojo-power
than svn.

cheers
Christian

> G
>
>
> On Mon, Mar 18, 2013 at 1:44 PM, Ivan Habunek <iv...@gmail.com>
> wrote:
>>
>> On 18 March 2013 18:27, Ralph Goers <ra...@dslextreme.com> wrote:
>> > Where are the processes that you use with Git documented?  While I'm
>> > very comfortable with SVN I am only passable on Git - I can happily work
>> > with other people's stuff but I'm not sure what it takes to integrate
>> > changes people make from their forks.
>>
>> Here's an example for accepting other people's work.
>>
>> We have an issue on the tracker:
>> https://issues.apache.org/jira/browse/LOG4PHP-207
>>
>> I got a patch from a person I trust and he asked me to merge it:
>> 0001-LOG4PHP-207-Using-class-MongoClient-instead-of-Mongo.patch
>>
>> To apply the patch you download it to your project and run:
>> git am --signoff
>> 0001-LOG4PHP-207-Using-class-MongoClient-instead-of-Mongo.patch
>>
>> By adding --signoff, you will get a line similar to this in your commit
>> message:
>> Signed-off-by: Ivan Habunek <iv...@gmail.com>
>>
>> Vladimir also used --signoff when creating the patch (see the
>> contributor guidelines I sent in the previous mail), so you get two
>> lines at the bottom of the commit message:
>> Signed-off-by: Vladimir Gorej <go...@codescale.net>
>> Signed-off-by: Ivan Habunek <iv...@gmail.com>
>>
>> That way, it's clearly visible who did participated in creating and
>> merging the commit.
>>
>> Here's the commit in our repo:
>>
>> https://git-wip-us.apache.org/repos/asf?p=logging-log4php.git;a=commit;h=f6d602f465dfb78aef67b196ac5456ff6c2b945f
>>
>> Regards,
>> Ivan
>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory



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

Re: Mirroring Log4J 2 on GitHub

Posted by Gary Gregory <ga...@gmail.com>.
But you do not have to do it that way right? We could keep master to be the
same as trunk.

G


On Mon, Mar 18, 2013 at 1:44 PM, Ivan Habunek <iv...@gmail.com>wrote:

> On 18 March 2013 18:27, Ralph Goers <ra...@dslextreme.com> wrote:
> > Where are the processes that you use with Git documented?  While I'm
> very comfortable with SVN I am only passable on Git - I can happily work
> with other people's stuff but I'm not sure what it takes to integrate
> changes people make from their forks.
>
> Here's an example for accepting other people's work.
>
> We have an issue on the tracker:
> https://issues.apache.org/jira/browse/LOG4PHP-207
>
> I got a patch from a person I trust and he asked me to merge it:
> 0001-LOG4PHP-207-Using-class-MongoClient-instead-of-Mongo.patch
>
> To apply the patch you download it to your project and run:
> git am --signoff
> 0001-LOG4PHP-207-Using-class-MongoClient-instead-of-Mongo.patch
>
> By adding --signoff, you will get a line similar to this in your commit
> message:
> Signed-off-by: Ivan Habunek <iv...@gmail.com>
>
> Vladimir also used --signoff when creating the patch (see the
> contributor guidelines I sent in the previous mail), so you get two
> lines at the bottom of the commit message:
> Signed-off-by: Vladimir Gorej <go...@codescale.net>
> Signed-off-by: Ivan Habunek <iv...@gmail.com>
>
> That way, it's clearly visible who did participated in creating and
> merging the commit.
>
> Here's the commit in our repo:
>
> https://git-wip-us.apache.org/repos/asf?p=logging-log4php.git;a=commit;h=f6d602f465dfb78aef67b196ac5456ff6c2b945f
>
> Regards,
> Ivan
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Mirroring Log4J 2 on GitHub

Posted by Ivan Habunek <iv...@gmail.com>.
On 18 March 2013 18:27, Ralph Goers <ra...@dslextreme.com> wrote:
> Where are the processes that you use with Git documented?  While I'm very comfortable with SVN I am only passable on Git - I can happily work with other people's stuff but I'm not sure what it takes to integrate changes people make from their forks.

Here's an example for accepting other people's work.

We have an issue on the tracker:
https://issues.apache.org/jira/browse/LOG4PHP-207

I got a patch from a person I trust and he asked me to merge it:
0001-LOG4PHP-207-Using-class-MongoClient-instead-of-Mongo.patch

To apply the patch you download it to your project and run:
git am --signoff 0001-LOG4PHP-207-Using-class-MongoClient-instead-of-Mongo.patch

By adding --signoff, you will get a line similar to this in your commit message:
Signed-off-by: Ivan Habunek <iv...@gmail.com>

Vladimir also used --signoff when creating the patch (see the
contributor guidelines I sent in the previous mail), so you get two
lines at the bottom of the commit message:
Signed-off-by: Vladimir Gorej <go...@codescale.net>
Signed-off-by: Ivan Habunek <iv...@gmail.com>

That way, it's clearly visible who did participated in creating and
merging the commit.

Here's the commit in our repo:
https://git-wip-us.apache.org/repos/asf?p=logging-log4php.git;a=commit;h=f6d602f465dfb78aef67b196ac5456ff6c2b945f

Regards,
Ivan

Re: Mirroring Log4J 2 on GitHub

Posted by Ivan Habunek <iv...@gmail.com>.
On 18 March 2013 18:27, Ralph Goers <ra...@dslextreme.com> wrote:
> Where are the processes that you use with Git documented?  While I'm very comfortable with SVN I am only passable on Git - I can happily work with other people's stuff but I'm not sure what it takes to integrate changes people make from their forks.

We don't have a very extensive documentation yet. We follow the so
called "git flow" model [1] which means we develop in the "develop"
branch and merge "master" branch with "develop" only when doing a
release. This means that "master" branch always contains the last
released version, and "develop" is similar to "trunk" in svn. This
might not be very visible in our repo yet because we have not made a
release since switching to git. :)

We also have a modest contributor's guide on our wiki [2].

Also, there's a git extension for automating some of the git flow
process [3] written by the same guy(s) who wrote the article under
[1].

I'm very happy with this workflow, it seems very natural.

[1] http://nvie.com/posts/a-successful-git-branching-model/
[2] http://wiki.apache.org/logging-log4php/Contributing
[3] https://github.com/nvie/gitflow

Regards,
Ivan

Re: Mirroring Log4J 2 on GitHub

Posted by Ralph Goers <ra...@dslextreme.com>.
Where are the processes that you use with Git documented?  While I'm very comfortable with SVN I am only passable on Git - I can happily work with other people's stuff but I'm not sure what it takes to integrate changes people make from their forks.

Ralph


On Mar 18, 2013, at 9:59 AM, Ivan Habunek wrote:

> On 18 March 2013 17:27, Ralph Goers <ra...@dslextreme.com> wrote:
>> What would it take to make git primary instead of a mirror?
> 
> It's actually pretty easy. You have guidelines here:
> https://git-wip-us.apache.org/docs/switching-to-git.html
> 
> Just open the infra issue with the info they specify there. Log4php
> moved to git with no problems.
> 
> Regards,
> Ivan


Re: Mirroring Log4J 2 on GitHub

Posted by Ivan Habunek <iv...@gmail.com>.
On 18 March 2013 17:27, Ralph Goers <ra...@dslextreme.com> wrote:
> What would it take to make git primary instead of a mirror?

It's actually pretty easy. You have guidelines here:
https://git-wip-us.apache.org/docs/switching-to-git.html

Just open the infra issue with the info they specify there. Log4php
moved to git with no problems.

Regards,
Ivan

Re: Mirroring Log4J 2 on GitHub

Posted by Ralph Goers <ra...@dslextreme.com>.
What would it take to make git primary instead of a mirror?

Ralph


On Mar 18, 2013, at 5:09 AM, Andrus Adamchik wrote:

> Hey guys,
> 
> There's a Log4J mirror on GitHub at https://github.com/apache/log4j . Would it be possible to also mirror Log4J2? 
> 
> We've recently switched to Log4J2 on one of the big projects that I am doing. Now we need to patch a few things for our work in a way that is likely not going to be accepted back to Log4J. Specifically we want to short-circuit Log4jLogEvent.getSource to return a fixed String. We are using AsynchAppender and 'Log4jLogEvent.getSource' is a noticeable performance bottleneck for us, and we currently don't see a better way around it (ok, to be completely honest, we just don't have the cycles to refactor Log4J2 properly). So the idea was to keep a GitHub fork and merge periodically with the master copy.
> 
> Any thoughts/comments on exposing "2" on GitHub. 
> 
> As an Apache member I can probably ping infra myself. But wanted to talk to the 'logging' community first.
> 
> Thanks,
> Andrus