MCPcopy Index your code
hub / github.com/microsoft/vscode-languageserver-node / TracerImpl

Class TracerImpl

server/src/main.ts:869–908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

867}
868
869class TracerImpl implements Tracer {
870
871 private _trace: Trace;
872 private _connection: IConnection;
873
874 constructor() {
875 this._trace = Trace.Off;
876 }
877
878 public attach(connection: IConnection) {
879 this._connection = connection;
880 }
881
882 public get connection(): IConnection {
883 if (!this._connection) {
884 throw new Error('Remote is not attached to a connection yet.');
885 }
886 return this._connection;
887 }
888
889 public initialize(_capabilities: ClientCapabilities): void {
890 }
891
892 public fillServerCapabilities(_capabilities: ServerCapabilities): void {
893 }
894
895 public set trace(value: Trace) {
896 this._trace = value;
897 }
898
899 public log(message: string, verbose?: string): void {
900 if (this._trace === Trace.Off) {
901 return;
902 }
903 this._connection.sendNotification(LogTraceNotification.type, {
904 message: message,
905 verbose: this._trace === Trace.Verbose ? verbose : undefined
906 });
907 }
908}
909
910class TelemetryImpl implements Telemetry {
911

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected