MCPcopy Create free account
hub / github.com/dbcli/mssql-cli / output_payload_to_file

Function output_payload_to_file

mssqlcli/telemetry.py:147–154  ·  view source on GitHub ↗
(payload)

Source from the content-addressed store, hash-verified

145@_user_agrees_to_telemetry
146@decorators.suppress_all_exceptions(raise_in_diagnostics=True)
147def output_payload_to_file(payload):
148 if payload:
149 config_dir = os.path.dirname(config.config_location())
150 telemetry_file_path = os.path.join(config_dir, MSSQL_CLI_TELEMETRY_FILE)
151
152 # Telemetry log file will only contain data points from the most recent session.
153 with open(telemetry_file_path, "w+") as telemetry_file:
154 json.dump(json.loads(payload), telemetry_file, indent=2)
155
156
157@decorators.suppress_all_exceptions(raise_in_diagnostics=True)

Callers 1

concludeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected