MCPcopy
hub / github.com/mongodb/node-mongodb-native / logWriteFailureHandler

Method logWriteFailureHandler

src/mongo_logger.ts:943–962  ·  view source on GitHub ↗
(error: Error)

Source from the content-addressed store, hash-verified

941 }
942
943 private logWriteFailureHandler(error: Error) {
944 if (this.logDestinationIsStdErr) {
945 this.turnOffSeverities();
946 this.clearPendingLog();
947 return;
948 }
949 this.logDestination = createStdioLogger(process.stderr);
950 this.logDestinationIsStdErr = true;
951 this.clearPendingLog();
952 this.error(MongoLoggableComponent.CLIENT, {
953 toLog: function () {
954 return {
955 message: 'User input for mongodbLogPath is now invalid. Logging is halted.',
956 error: error.message
957 };
958 }
959 });
960 this.turnOffSeverities();
961 this.clearPendingLog();
962 }
963
964 private clearPendingLog() {
965 this.pendingLog = null;

Callers 1

logMethod · 0.95

Calls 4

turnOffSeveritiesMethod · 0.95
clearPendingLogMethod · 0.95
createStdioLoggerFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected