Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-25327

Different format of log messages in Operator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • OP-3.0.0.GA
    • OP-2.4.0.GA
    • Operator
    • None

      Some log lines printed by Operator 3.0 preview (3.0-5) are now missing "logger" field.
      The same behaviour can be seen in latest Operator 2.4 (2.4-17).
      I tracked the change down to 2.4-10 being the fist one to have this difference (the first one build from uptream main branch, not based on 0.5.x wildfly-operator)

      In short, 2.4-9 format of this type of message

      {"level":"info","ts":0,"logger":"wildflyserver_controller","msg":"Scaling up and updating replica size to 3","StatefulSet.Namespace":"demo","StatefulSet.Name":"eap80"}
      

      was changed to 2.4-10+ format

      {"level":"info","ts":0,"msg":"Scaling up and updating replica size to 3","StatefulSet.Namespace":"demo","StatefulSet.Name":"eap80"}
      

      Example of different messages in 3.0-5:

      {"level":"info","ts":0,"msg":"For statefulset scaling down need to verify if pods were cleaned by recovery","StatefulSet.Namespace":"demo","StatefulSet.Name":"eap80"}
      {"level":"info","ts":0,"msg":"Scaling down and updating replica size to 0","StatefulSet.Namespace":"demo","StatefulSet.Name":"eap80"}
      {"level":"info","ts":0,"logger":"wildflyserver_resources","msg":"Resource generations do not match","WildFlyServer.Name":"eap80","WildFlyServer.Namespace":"demo","Resource.Name":"eap80","Resource.Type":"*v1.StatefulSet","WildFlyServer.Generation":4,"Resource.Generation":"3"}
      {"level":"info","ts":0,"logger":"wildflyserver_resources","msg":"Updating Resource","WildFlyServer.Namespace":"demo","WildFlyServer.Name":"eap80","Resource.Name":"eap80","Resource.Type":"*v1.StatefulSet"}
      {"level":"error","ts":0,"logger":"wildflyserver_resources","msg":"Failed to update resource","WildFlyServer.Namespace":"demo","WildFlyServer.Name":"eap80","Resource.Name":"eap80","Resource.Type":"*v1.StatefulSet","error":"Operation cannot be fulfilled on statefulsets.apps \"eap80\": the object has been modified; please apply your changes to the latest version and try again","stacktrace":"(trimmed)"}
      {"level":"error","ts":0,"msg":"Failed to Update StatefulSet.","StatefulSet.Namespace":"demo","StatefulSet.Name":"eap80","error":"Operation cannot be fulfilled on statefulsets.apps \"eap80\": the object has been modified; please apply your changes to the latest version and try again","stacktrace":"(trimmed)"}
      {"level":"error","ts":0,"logger":"controller-runtime.manager.controller.wildflyserver","msg":"Reconciler error","reconciler group":"wildfly.org","reconciler kind":"WildFlyServer","name":"eap80","namespace":"demo","error":"Operation cannot be fulfilled on statefulsets.apps \"eap80\": the object has been modified; please apply your changes to the latest version and try again","stacktrace":"(trimmed)"}
      

      Is there a way to unify that / go back to previous behaviour with always including "logger" field?

            jmesnil1@redhat.com Jeff Mesnil
            jbliznak@redhat.com Jan Blizňák
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: