admin:group-set-telemetry-log-level( $config as element(configuration), $group-id as xs:unsigned-long, $value as xs:string ) as element(configuration)
This function sets the initial log level for telemetry, which is also the maximum (finest) log level that will be sent.
xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; let $config := admin:get-configuration() let $spec := admin:group-set-telemetry-log-level($config, xdmp:group(), admin:group-get-file-log-level($config,xdmp:group() )) return admin:save-configuration($spec) (: sets the telemetry log level to match the server's file log level :)