Commands Logging

Hi,

When using the command feature and using the logger like below,

public class TestCommand(
    ILogger<TestCommand> logger,
    IDbConnectionFactory dbConnectionFactory)
    : AsyncCommandWithResult<Test, TestResponse>
{
        logger.LogInformation("hi");
}

Is there a way to view the logs for a given command? When I manually run the command via Admin UI, it doesn’t display any logs and I have to add any verbose information in the response object.

Thanks

Only inside a background job when you capture and store the logs with CreateJobLogger(), otherwise no, you’d need to inspect your App logs or return info in the response.

1 Like