If the lag detector's logger is set to `DEBUG` then the master will capture the hot threads on the lagging node and report them in its logs. However it's quite possible for this log message to be many kB in size, and log messages are apparently truncated at 10kB by default.

We should find another way to report this information to avoid hitting this size limit. Perhaps simply split the hot threads output up across multiple log messages, or perhaps find a different way to report it.
server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java
reason = "test includes assertions about ClusterBootstrapService logging",
        value = "org.elasticsearch.cluster.coordination.ClusterBootstrapService:INFO"
    )
    public void testClusterUUIDLogging() {
        final var mockAppender = new MockLogAppender();
        mockAppender.addExpectation(
            new MockLogAppender.SeenEventExpectation(
                "fresh node message",
                ClusterBootstrapService.class.getCanonicalName(),
                Level.INFO,
                "this node has not joined a bootstrapped cluster yet; [cluster.initial_master_nodes] is set to []"
            )
        );
        try (var ignored = mockAppender.capturing(ClusterBootstrapService.class); var cluster = new Cluster(randomIntBetween(1, 3))) {
            cluster.runRandomly();
            cluster.stabilise();
            mockAppender.assertAllExpectationsMatched();
            final var restartingNode = cluster.getAnyNode();
            mockAppender.addExpectation(
                new MockLogAppender.SeenEventExpectation(
                    "restarted node message",
                    ClusterBootstrapService.class.getCanonicalName(),
                    Level.INFO,
                    "this node is locked into cluster UUID ["
                        + restartingNode.getLastAppliedClusterState().metadata().clusterUUID()
                        + "] and will not attempt further cluster bootstrapping"
                )
            );
            restartingNode.close();
            cluster.clusterNodes.replaceAll(cn -> cn == restartingNode ? cn.restartedNode() : cn);