DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Need to support directing all messages to logs

Open SteveL-MSFT opened this issue 2 years ago • 7 comments

Summary of the new feature / enhancement

Support ETW and syslog

Proposed technical implementation details (optional)

No response

SteveL-MSFT avatar Jul 20 '23 15:07 SteveL-MSFT

For all cases where dsc.exe writes to stderr/stdout, we should abstract to calling an internal logging function that can also output to console for interactive use

SteveL-MSFT avatar Jul 26 '23 22:07 SteveL-MSFT

We should look into using OpenTelemetry for our logging and telemetry needs

Bpoe avatar Aug 01 '23 23:08 Bpoe

Big endorsement for otel - used it in my last role and it was incredibly good for bubbling up information. It's not much extra work to add a flag that makes a command emit the otel logging to stderr for debugging either.

michaeltlombardi avatar Aug 01 '23 23:08 michaeltlombardi

Consider providing an option to write detail dsc operational logs to file

  • This can include various component logs involved in invocation of the resources.
  • It will help identify resource issue vs dsc (platform) issue.
  • Provide retention policy for logs and log rotations.
  • One possible open source xplat logging library: - https://github.com/gabime/spdlog

BerheAbrha avatar Aug 02 '23 05:08 BerheAbrha

We should use https://docs.rs/tracing/latest/tracing/ which can integrate with OpenTelemetry

SteveL-MSFT avatar Aug 30 '23 22:08 SteveL-MSFT

Expose --loglevel [warning|info|debug] (terminating errors should always be logged. Then also separate parameter(s) to log to console (default), system (etw/syslog/oslog presumably via opentelemetry), file.

SteveL-MSFT avatar Sep 29 '23 19:09 SteveL-MSFT

Try looking at https://github.com/open-telemetry/opentelemetry-rust to see if it abstracts the different logging files/formats

SteveL-MSFT avatar Mar 27 '24 22:03 SteveL-MSFT