Skip to content

Commit 31d3408

Browse files
authored
Merge pull request #6274 from nickanderson/CFE-4228/master
CFE-4228: Added the promisee to verbose output for reports promises
2 parents 91463cf + d1e1b76 commit 31d3408

3 files changed

Lines changed: 34 additions & 1 deletion

File tree

libpromises/verify_reports.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ PromiseResult VerifyReportPromise(EvalContext *ctx, const Promise *pp)
133133

134134
YieldCurrentLock(thislock);
135135

136-
ClassAuditLog(ctx, pp, &a, result);
136+
/* cfPS calls ClassAuditLog itself and also logs the promise context,
137+
* which is where the promisee comes from */
138+
cfPS(ctx, LOG_LEVEL_VERBOSE, result, pp, &a, "Reports promise '%s' processed", pp->promiser);
137139
return result;
138140
}
139141

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
body common control
2+
{
3+
inputs => { "../default.sub.cf" };
4+
bundlesequence => { default("$(this.promise_filename)") };
5+
}
6+
7+
#######################################################
8+
bundle agent test
9+
{
10+
meta:
11+
"description" -> { "CFE-4228" }
12+
string => "Test that promisees on reports are emitted in verbose output.";
13+
}
14+
15+
#######################################################
16+
bundle agent check
17+
{
18+
methods:
19+
""
20+
usebundle => dcs_passif_output(
21+
".*promisee 'the_promisee_of_a_report'.*",
22+
"",
23+
"$(sys.cf_agent) -Kvf $(this.promise_filename).sub",
24+
$(this.promise_filename)
25+
);
26+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bundle agent main
2+
{
3+
reports:
4+
"This is an example report" -> "the_promisee_of_a_report";
5+
}

0 commit comments

Comments
 (0)