How change the logging level at runtime for IBM Liberty server?











up vote
0
down vote

favorite












The IBM WAS8 allows changing the logging level at runtime via API.
How to do the same thing for IBM Liberty server without changing the server.xml?
I think this is possible via defining custom API, e.g. REST endpoint that will do this. Is the vendor recommended way to do it?










share|improve this question


























    up vote
    0
    down vote

    favorite












    The IBM WAS8 allows changing the logging level at runtime via API.
    How to do the same thing for IBM Liberty server without changing the server.xml?
    I think this is possible via defining custom API, e.g. REST endpoint that will do this. Is the vendor recommended way to do it?










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      The IBM WAS8 allows changing the logging level at runtime via API.
      How to do the same thing for IBM Liberty server without changing the server.xml?
      I think this is possible via defining custom API, e.g. REST endpoint that will do this. Is the vendor recommended way to do it?










      share|improve this question













      The IBM WAS8 allows changing the logging level at runtime via API.
      How to do the same thing for IBM Liberty server without changing the server.xml?
      I think this is possible via defining custom API, e.g. REST endpoint that will do this. Is the vendor recommended way to do it?







      websphere-liberty open-liberty






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 7 at 14:41









      senleft

      213313




      213313
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Liberty does not provide an API equivalent to change logging levels. You can make the change at runtime (no restart required) by directly changing the server.xml or by changing the server.xml through Admin Center's Server Config tool (available in WebSphere Liberty, but not Open Liberty). I mention the latter because Admin Center uses public APIs for everything including making changes to the server.xml which means you could technically make the same API calls to change the server.xml to include your logging changes at runtime.
          However, the drawback with that approach is that you'd have to use the file transfer API to read the server.xml, then make appropriate changes to it, and then use file transfer API again to persist the changes.



          If you'd like to see an API for changing log levels, I would recommend opening an RFE (https://developer.ibm.com/wasdev/help/submit-rfe/)






          share|improve this answer























          • Thank you! I will submit RFE. It is a bit strange decision. Someone thought that developer will have access to file system of the prod server to change in runtime the logging level of the specific component.
            – senleft
            Nov 14 at 15:20













          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53191687%2fhow-change-the-logging-level-at-runtime-for-ibm-liberty-server%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          Liberty does not provide an API equivalent to change logging levels. You can make the change at runtime (no restart required) by directly changing the server.xml or by changing the server.xml through Admin Center's Server Config tool (available in WebSphere Liberty, but not Open Liberty). I mention the latter because Admin Center uses public APIs for everything including making changes to the server.xml which means you could technically make the same API calls to change the server.xml to include your logging changes at runtime.
          However, the drawback with that approach is that you'd have to use the file transfer API to read the server.xml, then make appropriate changes to it, and then use file transfer API again to persist the changes.



          If you'd like to see an API for changing log levels, I would recommend opening an RFE (https://developer.ibm.com/wasdev/help/submit-rfe/)






          share|improve this answer























          • Thank you! I will submit RFE. It is a bit strange decision. Someone thought that developer will have access to file system of the prod server to change in runtime the logging level of the specific component.
            – senleft
            Nov 14 at 15:20

















          up vote
          1
          down vote



          accepted










          Liberty does not provide an API equivalent to change logging levels. You can make the change at runtime (no restart required) by directly changing the server.xml or by changing the server.xml through Admin Center's Server Config tool (available in WebSphere Liberty, but not Open Liberty). I mention the latter because Admin Center uses public APIs for everything including making changes to the server.xml which means you could technically make the same API calls to change the server.xml to include your logging changes at runtime.
          However, the drawback with that approach is that you'd have to use the file transfer API to read the server.xml, then make appropriate changes to it, and then use file transfer API again to persist the changes.



          If you'd like to see an API for changing log levels, I would recommend opening an RFE (https://developer.ibm.com/wasdev/help/submit-rfe/)






          share|improve this answer























          • Thank you! I will submit RFE. It is a bit strange decision. Someone thought that developer will have access to file system of the prod server to change in runtime the logging level of the specific component.
            – senleft
            Nov 14 at 15:20















          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          Liberty does not provide an API equivalent to change logging levels. You can make the change at runtime (no restart required) by directly changing the server.xml or by changing the server.xml through Admin Center's Server Config tool (available in WebSphere Liberty, but not Open Liberty). I mention the latter because Admin Center uses public APIs for everything including making changes to the server.xml which means you could technically make the same API calls to change the server.xml to include your logging changes at runtime.
          However, the drawback with that approach is that you'd have to use the file transfer API to read the server.xml, then make appropriate changes to it, and then use file transfer API again to persist the changes.



          If you'd like to see an API for changing log levels, I would recommend opening an RFE (https://developer.ibm.com/wasdev/help/submit-rfe/)






          share|improve this answer














          Liberty does not provide an API equivalent to change logging levels. You can make the change at runtime (no restart required) by directly changing the server.xml or by changing the server.xml through Admin Center's Server Config tool (available in WebSphere Liberty, but not Open Liberty). I mention the latter because Admin Center uses public APIs for everything including making changes to the server.xml which means you could technically make the same API calls to change the server.xml to include your logging changes at runtime.
          However, the drawback with that approach is that you'd have to use the file transfer API to read the server.xml, then make appropriate changes to it, and then use file transfer API again to persist the changes.



          If you'd like to see an API for changing log levels, I would recommend opening an RFE (https://developer.ibm.com/wasdev/help/submit-rfe/)







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 7 at 15:41

























          answered Nov 7 at 15:32









          M. Broz

          35628




          35628












          • Thank you! I will submit RFE. It is a bit strange decision. Someone thought that developer will have access to file system of the prod server to change in runtime the logging level of the specific component.
            – senleft
            Nov 14 at 15:20




















          • Thank you! I will submit RFE. It is a bit strange decision. Someone thought that developer will have access to file system of the prod server to change in runtime the logging level of the specific component.
            – senleft
            Nov 14 at 15:20


















          Thank you! I will submit RFE. It is a bit strange decision. Someone thought that developer will have access to file system of the prod server to change in runtime the logging level of the specific component.
          – senleft
          Nov 14 at 15:20






          Thank you! I will submit RFE. It is a bit strange decision. Someone thought that developer will have access to file system of the prod server to change in runtime the logging level of the specific component.
          – senleft
          Nov 14 at 15:20




















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53191687%2fhow-change-the-logging-level-at-runtime-for-ibm-liberty-server%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Academy of Television Arts & Sciences

          L'Équipe

          1995 France bombings