Skip to content

Commit

Permalink
Macro start/end from daemon channel are only logged as debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishamm committed Apr 19, 2024
1 parent 8a62320 commit 1490d41
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/DuetControlServer/Files/MacroFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,14 @@ public bool IsExecuting
try
{
MacroFile macro = new(fileName, physicalFile, channel, startCode, sourceConnection);
_logger.Info("Starting macro file {0} on channel {1}", fileName, channel);
if (channel != CodeChannel.Daemon)
{
_logger.Info("Starting macro file {0} on channel {1}", fileName, channel);
}
else
{
_logger.Debug("Starting macro file {0} on channel {1}", fileName, channel);
}
return macro;
}
catch (FileNotFoundException)
Expand Down Expand Up @@ -421,7 +428,14 @@ private async Task Run()
IsExecuting = false;
if (!IsAborted)
{
_logger.Info("{0}: Finished macro file {1}", Channel, FileName);
if (Channel != CodeChannel.Daemon)
{
_logger.Info("{0}: Finished macro file {1}", Channel, FileName);
}
else
{
_logger.Debug("{0}: Finished macro file {1}", Channel, FileName);
}
}

// Resolve potential tasks waiting for the macro result
Expand Down

0 comments on commit 1490d41

Please sign in to comment.