Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Log4j2 Configuration

    Hi Isomorphic,

    We are migrating our application's logging from Log4j to Log4j2. We've been able to successfully reroute SmartGWT logging to Log4j2 per your documentation (https://www.smartclient.com/smartgwt...erLogging.html) and reconfigure appropriately.

    However, we would ideally like to avoid requiring existing customers to configure the two VM arguments (-DiscUseSlf4j=true, -DiscUseLog4jConfig=false). Is there any other way to set those properties for redirecting logging? Perhaps through, or at the level of, server.properties?

    Thanks

    #2
    Hi Isomorphic,
    Do you have any follow-up on this question?
    Thank you

    Comment


      #3
      Apologies for the delayed answer. Currently JVM arguments is the only way to configure logging to be redirected.

      Comment


        #4
        Thank you for the update.

        Do you think this is something you could consider providing through the server.properties?

        Regards

        Comment


          #5
          Definitely. It's something like a day's work, and it necessarily would involve reloading configuration twice, which potentially causes classloader or weirdness in initialization (Spring and JPA are notorious for issues in this area), so, we would document it as a secondary approach only. If you hurry, you could do this as a sponsorship that would be part of 13.0.

          Comment


            #6
            I would also like this as well.

            Comment


              #7
              Hi Sam, your account appears to be just two days old, created very close to the time that Stonebranch followed up, and you appear to be associated with "Universtiy [sic]". Just wondering what your experience with SmartGWT is, and why this feature matters to you?

              Not saying this is what's happening here, but we should mention, we really don't appreciate creating fake accounts to try to push us to create a feature that isn't popular, and our community doesn't either, as it means that features that multiple customers actually want may receive lower priority.

              Comment


                #8
                Just doing a pilot project atm and using all the latest libraries, hence log4j2 as well in my code so I too wondered how to make the smart gwt logging use the same log4j2 engine. I saw the other posts as well about using the properties to do it with...

                If you prefer newbies not asking stuff then I will refrain from further postings.
                Last edited by Sam Squanch; 13 May 2021, 06:00.

                Comment


                  #9
                  Hi Sam, we have no problem with newbies posting, we welcome it!

                  The documentation already explains how to redirect logging to log4j2 or any other logging system.

                  This thread was an inquiry by "stonebranch2" regarding whether we could provide an alternate mechanism to achieve the same thing.

                  Since you are in a POC it seems very unlikely that you need this alternate mechanism, so please just refer to the docs above as to how to set up logging for whatever framework you like.

                  Thanks.

                  Comment

                  Working...
                  X