new_in_town
08/29/2024, 10:54 AM/etc/typesense/typesense-server.ini
[server]
...
log-dir = /var/log/typesense
enable-search-logging = true
enable-access-logging = true
And after this - I see in the access log: /var/log/typesense/typesense-access.log
:
724926899904 127.0.0.1 OPTIONS /collections/r4/documents/search
1724926899908 127.0.0.1 GET /collections/r4/documents/search
1724926994767 127.0.0.1 OPTIONS /collections/r4/documents/search
1724926994772 127.0.0.1 GET /collections/r4/documents/search
Well, this is not much. Documentation say that enable-search-logging
:
> "Logs the search API request + payload right at the start of search request lifecycle"
Well... something is not OK here. For debugging I would like to see everything that comes from a client...Kishore Nallan
08/29/2024, 12:55 PMtypesense-access.log
file. The search logging entries will be in regular log file.new_in_town
08/29/2024, 1:23 PMI20240829 15:11:14.774144 50772 http_server.cpp:494] event=search_request, client_ip=127.0.0.1, endpoint=GET /collections/r4/documents/search?collection=r4&drop_tokens_threshold=0&exclude_fields=embedding&filter_by=...
Still, there are some issues with this:
1. This is not documented, I have to ask it hereKishore Nallan
08/29/2024, 1:25 PMnew_in_town
08/29/2024, 1:27 PMnew_in_town
08/29/2024, 1:29 PMThe flag is documented ...Would be great to document what goes into which log file, how many log files could be... and how to control (log levels?) content of log files...
Kishore Nallan
08/29/2024, 1:29 PMnew_in_town
08/29/2024, 1:31 PMKishore Nallan
08/29/2024, 1:33 PME
-- those are the error logs.new_in_town
08/29/2024, 1:38 PM/var/log/typesense
(Linux has software for this)
any restrictions/best practices for this?
These log rotation programs might, for example, move/delete the file typesense process writing...new_in_town
08/29/2024, 1:39 PME
By the way - please document the format of the log file.
I see lot of lines starting with I
- looks like "`INFO`".
E
means ERROR
What else is possible?
I should not guess - it should be possible to read documentation about this.Kishore Nallan
08/29/2024, 2:52 PMI
for info, E
for error, which is again standard logging convention, so we don't document it.
You can use https://vector.dev/ to build simple rules to send events that you need to another file or destination.