I've successfully integrated Doctrine MongoDB module in Zend Framework 2 and now I need to keep track of each query to MongoDB. Does anybody know how to turn on logging?
How to turn on logging (profiling) using ZF2 Doctrine MongoDb module
1.1k Views Asked by Pavel At
2
There are 2 best solutions below
2
slee
On
You can log each query using the MongoDB Database Profiler. Use profile level 2. All queries will be logged to the system.profile collection.
Related Questions in MONGODB
- Meteor MapReduce Package Error: A method named is already defined
- Token based authorization in nodejs/ExpressJs and Angular(Single Page Application)
- Big data with spatial queries/indexing
- How to recover from losing all your /data/db
- What are the benefits of using the fields option when querying in Meteor
- Node JS Async Response
- mongoose get property from nested schema after `group`
- What to use for subdocuments ID's in MongoDB?
- ORM Code First versa Database First in Production
- How to profile a Yii2 based API?
- get length of embedded document in mongoDB with jade
- Architecture: Multiple Mongo databases+connections vs multiple collections with Express
- Why are numbers being inserted into MongoDB incorrectly?
- hibernate ogm mongo db, how to get count of collection?
- C++ Mongodb driver, not working
Related Questions in ZEND-FRAMEWORK2
- Using own Application class in ZF2
- How to allow users to see content of a folder through url in ZF2
- Create a subquery using ALL and ANY statements
- ZF2 / Doctrine Form Multi-select Element for Many-to-Many Relation
- PHP/Zend Framework 2 - Unable to display table field values within dynamically generated table
- Zend Framework 2 Form Collection Validator
- Zf2 entity create a custom filters
- Accessing 2 different tables from same controller file
- zf2 api response event catched by bjyauthorize
- Refactor some calls on each Zf2 controller action
- Best way to configure a Table in Module.php - Zend 2
- ZF2 authentication session storage in memcached
- ZF2 form with fieldset and doctrine not working
- How to make Zf2 Apigilty accept client request with no Accept set in header
- Zend Framwork 2 - Tablegateway - Updating only one column of a row in DB
Related Questions in DOCTRINE-ODM
- Mongodb doctrine query builder full text search does not sort the results based on the textScore
- zf2 form collection hydration gets wrong $data in hydrator
- How do I query MongoDB collection based on related documents (in Doctrine)
- Unique Id for all the entities from all repositories
- Reference ORM (Entity) from ODM (Document, MongoDB) with ManyToMany relationship
- Translate from SQL to mongo
- Doctrine Mongo cascade remove children when child is the owning side
- Fixtures with a self-referencing many to many relation
- Doctrine Mongo ODM - select distinct values
- Doctrine ODM with MongoDB need both reference mappings set
- MongoDB doctrine ODM OneToMany not resolving to DB ref
- The class 'OAuthBundle\Entity\Client' was not found in the chain configured namespaces FOS\OAuthServerBundle\Document
- Best ODM solution on PHP that support versioning
- get a error of JMSSerializerBundle in Symfony2.3.4 and ODM
- Authentication using Doctrine 2 MongoDbODM Module
Related Questions in DOCTRINE-MONGODB
- Zend Framework 2 Doctrine MongoDB ODM and Apache too slow
- How can I set a default value in Doctrinemongodb document?
- Symfony2 Form pre-fill fields with data
- Get the stored date in symfony2 doctrine mongodb
- How sort an array in a collection
- Doctrine MongoDB delete reference only onRemove
- How do I add an object into MongoDB using Doctrine?
- Is the Doctrine Migrations project compatible with Doctrine MongoDB?
- ClassNotFoundException: Attempted to load class "Mongo" from... (with persist) symfony2
- Issue get Api Resource with custom id in Api Platform and Synfony
- Doctrine MongoDB - Hydrate results inside a facet using Doctrine MongoDB Aggregation Builder
- How to turn on logging (profiling) using ZF2 Doctrine MongoDb module
- findBy reference doctrine-mongodb
- symfony4: There is no extension able to load the configuration for "doctrine_mongodb"
- I do not know how to test the create query builder
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I just proposed a pull request on the DoctrineMongoODMModule to integrate the logging configuration option of MongoDB ODM. Hopefully it'll be merged soon.
You will then only have to add this in the
doctrine-mongo-odm.global.phpfile :The logger_callable will be called for everything there is to log.