Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-369

How to include the log4j2 lib jar into a jar with my application class and run it ?

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • None

    Description

      I used ant to build a app.jar which has log4j2.xml in the jar, however when I run the jar, it will miss the log4j2-core**.jar and log4j2-api**.jar as the lib. But I need to distribute the lib together with my app.jar as one jar file and run the app.jar(with the exlib in the jar), please tell me how to do that?

      I have tried simply pack the log4j2**.jar into the app.jar, but never print out any log, I think somehow must set the path inside jar to point the log4j2.properties in the log4j-**.jar file.

      Thanks!

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            kingwang98@yahoo.com wei wang
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.2h
                0.2h
                Remaining:
                Remaining Estimate - 0.2h
                0.2h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment