Any way to show logs in messages longer than two days?

Post Reply
RytisT
Member
Posts: 135
Joined: Fri Aug 17, 2018 3:18 pm

Any way to show logs in messages longer than two days?

Post by RytisT »

Hi. Is there a way to show logs for longer than two days?

Right now, there's only two days: http://prntscr.com/t1fx99
I'd love to see logs at least two months back.

Thank you.
Padawan
Advanced member
Posts: 358
Joined: Mon Jun 12, 2017 8:48 pm
Location: Belgium
Contact:

Re: Any way to show logs in messages longer than two days?

Post by Padawan »

It is possible to setup Switch to keep the log messages for longer then two days. However, that means that the messages database will get bigger. The bigger it is, the slower searching in it is and the slower it is for Switch to write messages to it, resulting in production impact. I would certainly NOT recommend having the messages of two months in there.

The alternative is to have Switch also log the messages to CSV files and to keep those CSV files for two months. You can set this up in the logging category of the Switch preferences.

When I personally want to know what went wrong with a job x amount of days ago, then I do a text search to know in which CSV file the job is mentioned and then I open the CSV in Excel and use Excel filtering functionality on it. This is by far not as easy as the webinterface to check the messages, but it keeps your Switch healthy.
jan_suhr
Advanced member
Posts: 592
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Any way to show logs in messages longer than two days?

Post by jan_suhr »

You could save a daily .CSV file of the logs that you upload to a mySql database. Then you can easily search that database without putting any extra load on the Switch server.

HTTP Request in Switch that uploads the CSV to a webserver and some PHP-scripts that fill the database would do it.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
RytisT
Member
Posts: 135
Joined: Fri Aug 17, 2018 3:18 pm

Re: Any way to show logs in messages longer than two days?

Post by RytisT »

jan_suhr wrote: Wed Jun 17, 2020 4:51 pm You could save a daily .CSV file of the logs that you upload to a mySql database. Then you can easily search that database without putting any extra load on the Switch server.

HTTP Request in Switch that uploads the CSV to a webserver and some PHP-scripts that fill the database would do it.
Mh, I'll try this. Thanks.
Post Reply