Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
I implemented centralized logging on my serveur and I run query directly on my PostGre SQL database to analyse logs on an external tool.
I query on the table log_entries QLogs database ...
When I reload an app and it fails, I expect that there are an event logged on the database log_entries table, but I can't find it.
Is that normal or did I missed the log row ? Or is there something to activate ?
Thank you in advance !
Hi Anormand
It's a bit tricky to see in the log_entries table, because the actual message is embedded in the json column 'payload'.
Try to use one of the views instead, view_all_errors_warnings for example
SELECT entry_timestamp, process_host, id, process_name, logger, entry_level
FROM public.view_all_errors_warnings
where message='Task finished with state FinishedFail'
Hi Anormand
It's a bit tricky to see in the log_entries table, because the actual message is embedded in the json column 'payload'.
Try to use one of the views instead, view_all_errors_warnings for example
SELECT entry_timestamp, process_host, id, process_name, logger, entry_level
FROM public.view_all_errors_warnings
where message='Task finished with state FinishedFail'
Thank you !
I was not able to use the view because of json errors ... but I has been able to find on the table :
select * from (SELECT id, entry_timestamp, entry_level, process_name, process_id, json_each_text(payload)::text as message FROM public.log_entries WHERE entry_level IN ('FATAL','ERROR') and entry_timestamp > CURRENT_DATE order by id desc ) as query where message like '(Message,"Task finished with state %' ;
For future readers !
Thank you again