Skip to content

Commit

Permalink
New : attempts to and asks for are now logged as Trace messages…
Browse files Browse the repository at this point in the history
… to facilitate log file filtering. q2ebanking#257
  • Loading branch information
Pressacco committed Mar 15, 2023
1 parent 29e73f6 commit 0d01a96
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Boa.Constrictor.Screenplay/Screenplay/Pattern/Actor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public Actor(string name = null, ILogger logger = null)
/// <returns></returns>
private TAnswer CallQuestion<TAnswer>(IQuestion<TAnswer> question, string observationPhrase, string enterPhrase, string exitPhrase)
{
Logger.Info($"{this} {enterPhrase} {question}");
Logger.Trace($"{this} {enterPhrase} {question}");
TAnswer answer = question.RequestAs(this);
Logger.Info($"{this} {observationPhrase} {question} {exitPhrase} {answer}");
return answer;
Expand All @@ -86,7 +86,7 @@ private TAnswer CallQuestion<TAnswer>(IQuestion<TAnswer> question, string observ
/// <returns></returns>
private async Task<TAnswer> CallQuestionAsync<TAnswer>(IQuestionAsync<TAnswer> question, string observationPhrase, string enterPhrase, string exitPhrase)
{
Logger.Info($"{this} {enterPhrase} {question}");
Logger.Trace($"{this} {enterPhrase} {question}");
TAnswer answer = await question.RequestAsAsync(this);
Logger.Info($"{this} {observationPhrase} {question} {exitPhrase} {answer}");
return answer;
Expand All @@ -100,7 +100,7 @@ private async Task<TAnswer> CallQuestionAsync<TAnswer>(IQuestionAsync<TAnswer> q
/// <param name="exitPhrase">The phrase to print after calling.</param>
public void CallTask(ITask task, string enterPhrase, string exitPhrase)
{
Logger.Info($"{this} {enterPhrase} {task}");
Logger.Trace($"{this} {enterPhrase} {task}");
task.PerformAs(this);
Logger.Info($"{this} {exitPhrase} {task}");
}
Expand All @@ -113,7 +113,7 @@ public void CallTask(ITask task, string enterPhrase, string exitPhrase)
/// <param name="exitPhrase">The phrase to print after calling.</param>
public async Task CallTaskAsync(ITaskAsync task, string enterPhrase, string exitPhrase)
{
Logger.Info($"{this} {enterPhrase} {task}");
Logger.Trace($"{this} {enterPhrase} {task}");
await task.PerformAsAsync(this);
Logger.Info($"{this} {exitPhrase} {task}");
}
Expand Down

0 comments on commit 0d01a96

Please sign in to comment.