Could we add source file name and line number to log output?
Author: harismuzafferCreated Aug 31, 2026Updated Sep 9, 2026
Problem When we are reading logs while debugging an issue, i personally feel it is highly useful to see line number and the source file name in logs. Currently a typical log output looks like:
2026-08-31T07:22:10.398376Z INFO HTTP request{method=PUT host="localhost:7700" route=/indexes/test-debug/settings/stop-words query_parameters= user_agent=curl/8.18.0 status_code=202}: meilisearch: close time.busy=10.0ms time.idle=5.50ms
2026-08-31T07:22:11.392857Z INFO index_scheduler::scheduler: A batch of tasks was successfully completed with 1 successful tasks and 0 failed tasks.
2026-08-31T07:22:37.220710Z INFO HTTP request{method=POST host="localhost:7700" route=/indexes/movies100/documents query_parameters= user_agent=curl/8.18.0 status_code=202}: meilisearch: close time.busy=16.0ms time.idle=1.36s
2026-08-31T07:22:37.235039Z INFO milli::update::new::indexer::guess_primary_key: Primary key was not specified in index. Inferred to 'id'
2026-08-31T07:23:06.690697Z INFO index_scheduler::scheduler::process_index_operation: document indexing done indexing_result=DocumentAdditionResult { indexed_documents: 31944, number_of_documents: 31944 } processed_in=29.457108427s
2026-08-31T07:23:07.066684Z INFO index_scheduler::scheduler: A batch of tasks was successfully completed with 1 successful tasks and 0 failed tasks.
It is hard to find the log message in the code with just mod/fn name.
Could be a good-first-issue
Expected behavior Include the file and line:
2026-08-31T07:27:07.286467Z INFO HTTP request{method=POST host="localhost:7700" route=/indexes/movies100/documents query_parameters= user_agent=curl/8.18.0 status_code=202}: meilisearch: crates/meilisearch/src/lib.rs:188: close time.busy=19.8ms time.idle=1.41s
2026-08-31T07:27:13.126574Z INFO index_scheduler::scheduler::process_index_operation: crates/index-scheduler/src/scheduler/process_index_operation.rs:239: document indexing done indexing_result=DocumentAdditionResult { indexed_documents: 31944, number_of_documents: 31944 } processed_in=5.82340384s
2026-08-31T07:27:13.199071Z INFO index_scheduler::scheduler: crates/index-scheduler/src/scheduler/mod.rs:328: A batch of tasks was successfully completed with 1 successful tasks and 0 failed tasks.
Meilisearch version: [e.g. v1.53.1]
Source: meilisearch/meilisearch