MongoDB - Wo ist die Protokolldatei?
Standardmäßig erstellt MongoDB die Protokolldatei unter diesem Pfad/var/log/mongodb/mongodb.log
. Wenn die Protokolldatei nicht gefunden wird, überprüfen Sie dies bitte anhand der MongoDB-Konfigurationsdatei.
logpath
Überprüfen Sie die MongoDB-Konfigurationsdatei bei/etc/mongod.conf
oder/yourMongoDBpath/mongod.conf
, wobeilogpath
definiert sind, wo protokolliert werden soll.
/etc/mongod.conf
$ cat /etc/mongod.conf # mongod.conf # Where to store the data. # Note: if you run mongodb as a non-root user (recommended) you may # need to create and set permissions for this directory manually, # e.g., if the parent directory isn't mutable by the mongodb user. dbpath=/var/lib/mongodb3 #where to log logpath=/var/log/mongodb/mongod.log #...