Skip to content

Compile

Turn source code and binaries into a symbol library.

The compile family scans a mix of sources: a local folder, GitHub repos, docker/OCI images, Helm charts, and Artifactory artifacts. It writes a per-file .10x.json unit for each, then links them into one .10x.tar.

That library is what the 10x runtime reads later to assign hidden classes (TenXTemplates) to log events, so a pattern's identity tracks the line of code that emitted it.

Compiling is bounded-synchronous. log10x_compile waits inline up to max_wait_ms (default 45s), then returns the finished library plus the full scan and link diagnostics in one call.

A small compile finishes inside that wait. So does a re-run over unchanged local sources: the output folder is pinned per source set and compiler, and the engine skips every file whose checksum already has a unit there. Pulled sources are re-checked remotely on each run (GitHub branch head, image digest, Artifactory listing) and downloaded again only when they changed; Helm charts are rendered again every run.

A long first compile of a large tree overruns the wait and returns a running job_id. Poll it with log10x_compile_status. Calling log10x_compile again with the same arguments while that job runs joins it instead of starting a second engine on the same folder.

The engine stops a scan on its own caps and still exits 0. log10x_compile_status reads the engine's loss markers out of the log and reports such a run as incomplete.

To re-link an existing units tree into a library with no source scan, use log10x_compile_link.

You

compile a symbol library from github apache/commons-cli

Log10x

Compile job a1f2c3 done, 31 units linked to symbols.10x.tar (412 KB). No scan failures.

You

how is the big compile coming along?

Log10x

Compile job 7d4e9b running, 2m14s elapsed, 8,640 units so far, 12 files failed to scan (java 9, python 3). Poll again.

You

re-link the units I pruned

Log10x

Link job c90a11 done, 27 units merged to symbols.10x.tar (388 KB). 4 units excluded by name filter.

You ask Example answer
compile a library from a folder, repos, images, charts, or Artifactory Compile job a1f2c3 done, 31 units linked to symbols.10x.tar (412 KB). Or a running job_id for a long first compile.
check on compile job 7d4e9b job_status plus units, the linked .10x.tar, per-language scan-failure counts, the link report, and a redacted log tail.
re-link a folder of units into one library Link job c90a11 done, 27 units merged to symbols.10x.tar (388 KB). No source re-scan.

Prerequisites

The compile family runs the Compiler app, which executes the compile pipeline, docker-first. By default it pulls log10x/compiler-10x:1.1.136, pinned by digest, so every run goes through the same compiler.

That image bundles the following, so no host docker socket is needed:

  • a daemonless podman for image pulls
  • the GitHub and Artifactory REST clients
  • the helm CLI

With mode: "local" it uses a local Compiler-flavor tenx instead. The Runtime flavor is refused. Raising the engine's whole-scan cap from the tool needs compiler 1.1.89 or newer; an older local engine keeps its bundled 10 minute cap.

This is the CLI tier, so it needs no Kubernetes, deployed app, or Log10x account.

GitHub pull requires a token even for public repos (github_token, or GH_TOKEN / GITHUB_TOKEN). Artifactory pull also requires a token (artifactory_token or ARTIFACTORY_TOKEN). Public docker images and public Helm charts need no credentials.

Source coverage:

  • gomod pull is deliberately not exposed, because it floods the library with transitive dependencies.
  • Archives are scanned: .jar, .war, .ear, .zip, .gz and tarballs are expanded by the archive scanner and their entries scanned, .class bytecode included.