Trinity Logger bundle

Installs: 4 109

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 16

Forks: 0

Open Issues: 0


v1.1.19 2017-12-13 12:00 UTC


This bundle is reconstructed for new elasticsearch (v5) and the read me is not actualized yet. TODO

Coverage Status Build Status

Bundle for storing and loading logs in ElasticSearch database.

Write issue if you found something that doesn't work as it should.

Logger creates new index each day in format YYYY-MM-DD. It works with environment and as for now two types are used. Development and Production logs are written into same index. The test environment adds prefix 'test-' before the index.

Thanks to this the logs may be viewed directly by using URL:


for example:

    elastic_host: ''
    managed_index: 'necktie'

Configured index can be changed when method is called.

Classic call:


Call different index:


For searching it is required to know where is entity class stored. Most classes are stored on same place and therefor they can be added into configuration as follow:

    elastic_host: ''
    managed_index: 'necktie'
    entities_path: 'Necktie\\AppBundle\\Entity'

When we use nqlQuery (see trinity/search for more about used nqlQuery) we can call:

$entities = $this->get('')->getByQuery($nqlQuery);

If entity definition is stored elsewhere, we go for example as this:

$entities = $this->get('')

Note: ElasticSearch is noSQL database.... NO!!!SQL therefor it will go with only queries under one entity. If you need join something use relation based SQL database.

As main use of this bundle for now is Necktie, following values are used as default and doesn't require configuration. managed_index: 'necktie' entities_path: 'Necktie\AppBundle\Entity'