Add more info messages to user, rename log printing function
This commit is contained in:
parent
eeee462f05
commit
a758ec55e8
9 changed files with 22 additions and 13 deletions
|
|
@ -22,6 +22,9 @@ async function run(uploadSarifDebugArtifact: Function) {
|
|||
|
||||
// Upload Actions SARIF artifacts for debugging
|
||||
if (config?.debugMode) {
|
||||
core.info(
|
||||
"Debug mode is on. Uploading available SARIF files as Actions debugging artifact..."
|
||||
);
|
||||
const outputDir = actionsUtil.getRequiredInput("output");
|
||||
await uploadSarifDebugArtifact(config, outputDir);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ export async function uploadSarifDebugArtifact(
|
|||
await uploadDebugArtifacts(toUpload, outputDir, config.debugArtifactName);
|
||||
}
|
||||
|
||||
export async function uploadFinalLogsDebugArtifact(config: Config) {
|
||||
export async function printDebugLogs(config: Config) {
|
||||
core.info("Debug mode is on. Printing CodeQL debug logs...");
|
||||
for (const language of config.languages) {
|
||||
const databaseDirectory = getCodeQLDatabasePath(config, language);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import { getActionsLogger } from "./logging";
|
|||
async function run(
|
||||
uploadDatabaseBundleDebugArtifact: Function,
|
||||
uploadLogsDebugArtifact: Function,
|
||||
uploadFinalLogsDebugArtifact: Function
|
||||
printDebugLogs: Function
|
||||
) {
|
||||
const logger = getActionsLogger();
|
||||
|
||||
|
|
@ -27,9 +27,13 @@ async function run(
|
|||
|
||||
// Upload appropriate Actions artifacts for debugging
|
||||
if (config?.debugMode) {
|
||||
core.info(
|
||||
"Debug mode is on. Uploading available database bundles and logs as Actions debugging artifacts..."
|
||||
);
|
||||
await uploadDatabaseBundleDebugArtifact(config, logger);
|
||||
await uploadLogsDebugArtifact(config);
|
||||
await uploadFinalLogsDebugArtifact(config);
|
||||
|
||||
await printDebugLogs(config);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -38,7 +42,7 @@ async function runWrapper() {
|
|||
await run(
|
||||
debugArtifacts.uploadDatabaseBundleDebugArtifact,
|
||||
debugArtifacts.uploadLogsDebugArtifact,
|
||||
debugArtifacts.uploadFinalLogsDebugArtifact
|
||||
debugArtifacts.printDebugLogs
|
||||
);
|
||||
} catch (error) {
|
||||
core.setFailed(`init action cleanup failed: ${error}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue