Logs - critical data retrieval
shaunnez
HOBBYOP

a year ago

Hello,

I have 12 hours worth of data in the logs which I desperately need to export (user data that didn't reach my db).

Searching for the relevant record only shows the first line, and not the proceeding json object. (I did not use structured logs).

I've been writing some javascript code to extra the text, scroll up, click load more, and rinse and repeat, but it's not great.

I've also tried the bookmark code -- but that doesn't work (even after tweaking it so it uses railway.app)

Is there ANY way to export 24 hours of logs to a text file of some shape? Please help

Solved

4 Replies

a year ago

You can use the command pallet to export the last 5000 log lines.

Open the logs -> ctrl / cmd + k -> search for logs


a year ago

> I've also tried the bookmark code -- but that doesn't work

Can you tell me why?

> tweaking it so it uses railway.app

We moved to railway.com, thus the bookmarklet uses .com


shaunnez
HOBBYOP

a year ago

Interesting - railway.app works as a domain.

The bookmarket throws an exception.

I ended up writing this code instead -- essentially going into the logs, scrolling to the beginning of the time you want, and running it - puts it all into an array


a year ago

> Interesting - railway.app works as a domain.

Yes it does, we have not hard cut over yet.

> The bookmarket throws an exception.

Will look into it.


Status changed to Solved brody about 1 year ago


Loading...