XCLogParser JSON Format

March 26, 2026 ยท View on GitHub

A typical step is parsed and output as JSON with the following format:

{
    "detailStepType" : "swiftCompilation",
    "startTimestamp" : 1545143336.649699,
    "endTimestamp" : 1545143336.649699,
    "schema" : "MyApp",
    "domain" : "com.apple.dt.IDE.BuildLogSection",
    "parentIdentifier" : "095709ba230e4eda80ab43be3b68f99c_1545299644.4805899_20",
    "endDate" : "2018-12-18T14:28:56.650000+0000",
    "title" : "Compile \/Users\/<redacted>\/projects\/MyApp\/Libraries\/Utilities\/Sources\/Disposables\/Cancelable.swift",
    "identifier" : "095709ba230e4eda80ab43be3b68f99c_1545299644.4805899_185",
    "signature" : "CompileSwift normal x86_64 \/Users\/<redacted>\/MyApp\/Libraries\/Utilities\/Sources\/Disposables\/Cancelable.swift",
    "type" : "detail",
    "buildStatus" : "succeeded",
    "subSteps" : [

    ],
    "startDate" : "2018-12-18T14:28:56.650000+0000",
    "buildIdentifier" : "095709ba230e4eda80ab43be3b68f99c_1545299644.4805899",
    "machineName" : "095709ba230e4eda80ab43be3b68f99c",
    "duration" : 5.5941859483718872,
    "errorCount" : 0,
    "warningCount" : 0,
    "errors" : [],
    "warnings" : [],
    "fetchedFromCache" : false,
    "compilationEndTimestamp": 1545143336.649699,
    "compilationDuration": 5.5941859483718872,
    "swiftFunctionTimes" : [
        {
          "durationMS" : 0.08,
          "occurrences" : 5,
          "startingColumn" : 36,
          "startingLine" : 48,
          "file" : "file:\/\/\/Users\/<redacted>\/MyApp\/Libraries\/Utilities\/Sources\/Disposables\/Cancelable.swift",
          "signature" : "getter description"
        }
      ],
    "swiftTypeCheckTimes" : [
        {
          "durationMS" : 0.5,
          "occurrences" : 2,
          "startingColumn" : 16,
          "startingLine" : 9,
          "file" : "file:\/\/\/Users\/<redacted>\/MyApp\/Libraries\/Utilities\/Sources\/Disposables\/Cancelable.swift",
        }
      ]
}

The type field can assume three different values:

  • main: the summary of the whole build process. It's usually the Xcode scheme that was built.
  • target: a target that was built that belongs to a main type.
  • detail: a step inside the target. Usually a script that was run during a Pre build phase, the compilation of a single file inside the target or other Build Rule.

Other fields:

  • buildIdentifier: a unique identifier for the given build. It uses the machine name plus the IDEActivityLog's unique identifier so it should be unique across different hosts.
  • duration: duration in seconds for the given step.
  • subSteps: an array of build steps that belong to the given one.
  • parentIdentifier: identifier of the step to which the given step belongs to.
  • schema: the name of the schema that was run.
  • buildStatus: succeeded or failed
  • machineName: the name of the host. If provided, it uses the value of the parameter machine_name, If not, it uses the name returned by Host.current().localizedName.
  • signature: for build steps of type detail it has the actual command executed.
  • detailStepType: only for build steps of type detail . It has some info about what was run inside that step.
  • warningCount: the number of warnings thrown by the compiler for the given step.
  • warnings: the list of warnings
  • errorCount: the number of errors for the given step.
  • errors: the list of errors.
  • swiftFunctionTimes: Optional. If the step is a swiftCompilation and the app was compiled with the flags -Xfrontend -debug-time-function-bodies it will show the list of functions and their compilation time. The occurrences is the number of times that function is compiled, so the effective time it took in your build is durationMS * ocurrences.
  • swiftTypeCheckTimes: Optional. If the step is a swiftCompilation and the app was compiled with the flags -debug-time-expression-type-checking it will show the list of functions and their compilation time. The occurrences is the number of times that check happens, so the effective time it took in your buikd is durationMS * ocurrences.
  • fetchedFromCache: For a detail step, true indicates that the file wasn't processed nor compiled but fetched from Xcode's internal cache. For a main or target step, true indicates that all its sub steps were fetched from cache, false that at least one sub step was proccesed or compiled.
  • compilationEndTimestamp: Timestamp in which the actual compilation finished. For a Target this could be before endTimestamp because in the new Xcode Build System linking can happen way after compilation.
  • compilationDuration Actual duration in seconds of just the compilation phase. In a Target this could be significant shorter than the duration.

Attachments (Xcode 15.3+)

When using the dump command, each IDEActivityLogSection may include an attachments array. This was introduced in SLF version 11 (Xcode 15.3). Each attachment has an identifier, majorVersion, minorVersion, and one of the following typed payloads:

BuildOperationTaskMetrics

Per-task execution metrics:

{
  "identifier": "com.apple.dt.ActivityLogSectionAttachment.TaskMetrics",
  "majorVersion": 1,
  "minorVersion": 0,
  "metrics": {
    "utime": 1834,
    "stime": 1723,
    "maxRSS": 3391488,
    "wcStartTime": 793866997013418,
    "wcDuration": 141479
  }
}

BuildOperationMetrics

Aggregate build operation metrics. The JSON format differs by Xcode version:

Xcode 15.3 - Xcode 16.x:

{
  "identifier": "com.apple.dt.ActivityLogSectionAttachment.BuildOperationMetrics",
  "majorVersion": 1,
  "minorVersion": 0,
  "buildOperationMetrics": {
    "clangCacheHits": 0,
    "clangCacheMisses": 2,
    "swiftCacheHits": 0,
    "swiftCacheMisses": 8
  }
}

Xcode 26.4+:

{
  "identifier": "com.apple.dt.ActivityLogSectionAttachment.BuildOperationMetrics",
  "majorVersion": 1,
  "minorVersion": 0,
  "buildOperationMetrics": {
    "counters": {},
    "taskCounters": {
      "SwiftDriver": {
        "moduleDependenciesNotValidatedTasks": 1
      }
    }
  }
}

XCLogParser automatically detects and supports both formats.

BuildOperationTaskBacktrace

Backtrace frames explaining why a build task was executed:

{
  "identifier": "com.apple.dt.ActivityLogSectionAttachment.TaskBacktrace",
  "majorVersion": 1,
  "minorVersion": 0,
  "backtrace": [
    {
      "description": "'Planning Swift module Foo' had never run",
      "category": { "ruleNeverBuilt": {} }
    }
  ]
}

Detail step types

When possible, the signature content of detail steps is parsed to determine its type. This makes it easier to aggregate the data.

ValueDescription
cCompilationAn Objective-C, C or C++ file was compiled
swiftCompilationA Swift file was compiled
scriptExecutionA Build phase script was ran
createStaticLibraryAn Static library was created with Libtool
linkerThe linker ran
copySwiftLibsThe Swift Runtime libs were copied
compileAssetsCatalogAn Assets catalog was compiled
compileStoryboardAn Storyboard file was compiled
writeAuxiliaryFileAn Auxiliary file was copied into derived data
linkStoryboardsLinking of Storyboards
copyResourceFileA Resource file was copied
mergeSwiftModuleThe merge swift module tool was executed
XIBCompilationA XIB file was compiled
swiftAggregatedCompilationAggregated swift compilations
precompileBridgingHeaderBridging header was precompiled
otherNeither of the above
noneFor steps that are not of type detail