Skip to content

Instantly share code, notes, and snippets.

@ephrin
Created November 16, 2022 14:49
Show Gist options
  • Save ephrin/1ff4c8c72dc69aa42ede07457668d581 to your computer and use it in GitHub Desktop.
Save ephrin/1ff4c8c72dc69aa42ede07457668d581 to your computer and use it in GitHub Desktop.
MongoDB Replication Log from mongosh CLI
db.adminCommand( { getLog:'global'} ).log.forEach(x => { var l = JSON.parse(x); if(l.c === "REPL") {console.log(l)}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment