Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-14905

Issue in turning off asset log packages via the log4j. properties file.

XMLWordPrintable

      Issue Summary:

      The import operation in assets (insight) is a very common operation, and it writes logs to both the atlassian-jira.log and insight_import.log files, which consume disk space on the servers. To avoid disk space issues, we would like to disable the assets import packages.

      Steps to Reproduce:

      1. Update the atlassian-jira/WEB-INF/classes/log4j.properties file as below:
        #####################################################
        # Insight logs
        #####################################################
        log4j.logger.com.riadalabs.jira.plugins.insight.services.imports.schema.log.ImportLogger = OFF
        log4j.additivity.com.riadalabs.jira.plugins.insight.services.imports.schema.log.ImportLogger = false
        
      2. Restart Jira.

      Expected Results:

      Import logs should not be written in atlassian-jira.log and insight import.log files

      Actual Results:

      Import logs are written in the insight_import.log file.

      2023-12-01 11:48:11,446 [http-nio-8949-exec-10 url: /j949/rest/insight/1.0/import/start/7; user: admin] | Started import in new thread, importSourceId: 7
      2023-12-01 11:48:11,447 [insight-InsightThreadGroup-worker-thread-35] | Ok testing >>> Starting import Ok testing with id 7 of type rlabs-import-type-csv with number of workers 10 at time 2023-12-01T11:48:11.447358
      2023-12-01 11:48:11,451 [insight-InsightThreadGroup-worker-thread-35] | Ok testing>>> Number of enabled ImportSourceOTs: 1
      2023-12-01 11:48:11,451 [insight-InsightThreadGroup-worker-thread-35] | Ok testing>>> Number of enabled ImportSourceOTs: 1
      2023-12-01 11:48:11,454 [insight-InsightImportThreadGroup-worker-thread-1] | Ok testing>>> Started reading data for configured object type id 16
      2023-12-01 11:48:11,474 [insight-InsightImportThreadGroup-worker-thread-1] | >>> readDataToTable()...
      2023-12-01 11:48:11,474 [insight-InsightImportThreadGroup-worker-thread-1] | import from: fileId
      2023-12-01 11:48:11,474 [insight-InsightImportThreadGroup-worker-thread-1] | url: null
      2023-12-01 11:48:11,474 [insight-InsightImportThreadGroup-worker-thread-1] | fileId: 7
      2023-12-01 11:48:11,474 [insight-InsightImportThreadGroup-worker-thread-1] | csvPreference delim. char: 44
      2023-12-01 11:48:11,475 [insight-InsightImportThreadGroup-worker-thread-1] | readDataToTable...
      2023-12-01 11:48:11,475 [insight-InsightImportThreadGroup-worker-thread-1] | header:index: Name,ID,Username
      2023-12-01 11:48:11,476 [insight-InsightImportThreadGroup-worker-thread-1] | <<< readDataToTable().
      2023-12-01 11:48:11,476 [insight-InsightImportThreadGroup-worker-thread-1] | Ok testing>>> Completed reading data for configured object type id 16 in 21 ms
      2023-12-01 11:48:11,477 [insight-InsightImportThreadGroup-worker-thread-1] | Ok testing>>Using memory backed import for import source object type 7
      2023-12-01 11:48:11,477 [insight-InsightThreadGroup-worker-thread-35] | Ok testing>>> Fetched all data locators from external source in 25 ms
      2023-12-01 11:48:11,486 [insight-InsightThreadGroup-worker-thread-35] | Ok testing>>> Mapped all data to internal objects in 8 ms
      2023-12-01 11:48:11,490 [insight-InsightThreadGroup-worker-thread-35] | Ok testing>>> Decided actions for all objects in 3 ms
      2023-12-01 11:48:11,490 [insight-InsightThreadGroup-worker-thread-35] | Ok testing>>> Objects to import 3
      2023-12-01 11:48:11,491 [insight-InsightThreadGroup-worker-thread-35] | Ok testing>>> Starting handling of missing objects and post actions
      2023-12-01 11:48:11,491 [insight-InsightThreadGroup-worker-thread-35] | Do post function for import source OT for 16 with id 7 of type rlabs-import-type-csv for object type 16 at time 2023-12-01T11:48:11.491650
      2023-12-01 11:48:11,493 [insight-InsightThreadGroup-worker-thread-35] | Ok testing>>> Do post function for import source for Ok testing with id 7 for object schema: 1 at time 2023-12-01T11:48:11.493278
      2023-12-01 11:48:11,493 [insight-InsightThreadGroup-worker-thread-35] | No outbound references to update
      2023-12-01 11:48:11,493 [insight-InsightThreadGroup-worker-thread-35] | Ok testing>>> Finished import with id 7 of type rlabs-import-type-csv at time 2023-12-01T11:48:11.493932. Import took 46 ms
      2023-12-01 11:48:11,533 [insight-InsightThreadGroup-worker-thread-35] | com.riadalabs.jira.plugins.insight.services.imports.common.ImportResult@6027c51[
        status=FINISHED
        started=Fri Dec 01 11:48:11 IST 2023
        ended=Fri Dec 01 11:48:11 IST 2023
        executedType=MANUAL
        executedAsUserKey=JIRAUSER10000
        objectSchemaId=1
        numberOfWorkers=10
        importSourceId=7
        populatedObjectTypes=[CSV import, CSV import]
        moduleKey=rlabs-import-type-csv
        moduleVersion=1
        updateReferencesTimeInMs=0
        onlyExecutedForObjectTypeIds=[]
        result=OK
        infoMessage=<null>
        errorMessages=<null>
        ObjectTypes : objectTypeResultMap={16=com.riadalabs.jira.plugins.insight.services.imports.common.ImportResult$ObjectTypeResult@124bd8ec[
        objectTypeName=CSV import
        objectTypeId=16
        objectsUpdated=0
        objectsCreated=0
        objectsIdentical=3
        entriesInSource=3
        objectsFilteredWithIQL=0
        duplicateEntries=0
        emptyLabelEntries=0
        emptyExternalIdEntries=0
        objectsMissingUpdated=0
        objectsMissingDeleted=0
        errorMessages=<null>
        readExternalDataTimeInMs=21
        mapExternalDataTimeInMs=0
        iqlFilteringDataTimeInMs=0
        decidingActionsTimeInMs=6
        writeInsightDataTimeInMs=0
        postFunctionTimeInMs=1
        executionTimeInMs=28
        objectsWithUpdatedReferences=0
      ]}
      ]
      

      Workaround:

      Currently, there is no known workaround for this behavior. A workaround will be added here when available

              Unassigned Unassigned
              nravi@atlassian.com Naveen Ravi
              Votes:
              6 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: