aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.03k stars 323 forks source link

Replace mock logger with silent seelog logger #476

Closed chrisnovakovic closed 1 year ago

chrisnovakovic commented 1 year ago

Issue #, if available:

475

Description of changes:

Many packages rely on agent/log's NewSilentMockLog in situations where a logger is required for a function call but any messages sent to it can be discarded. This introduces a dependency on the testify test toolkit in non-test code. Replace these calls to NewSilentMockLog with requests for a new real seelog logger that simply discards any messages sent to it.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

gianniLesl commented 1 year ago

Thanks for this contribution, we plan to incorporate part of this in a future release

gianniLesl commented 1 year ago

Silent logger incorporated in https://github.com/aws/amazon-ssm-agent/commit/d12c446111ec0e3658fc42a1cddb620a1bbc1555 to move testify dependency out of non-test code