-
-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(settings): basic log api and ui #337
Conversation
This pull request introduces 1 alert when merging 7bc1b8a into df4ac83 - view on LGTM.com new alerts:
|
I converted this to a draft for now while we get it ironed out. |
const messages = defineMessages({ | ||
logs: 'Logs', | ||
logsDescription: | ||
'You can access your logs directly in stdout (container logs) or looking in /app/config/logs/overseerr.logs', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will want to have the same <code>
tags in here like we did in the temporary message. If you only put the tags in here by themselves though, they will be just rendered out in the string.
You can see how this is done in the RequestList
component. I apply tags in there.
<div className="mt-4 text-sm"> | ||
{data?.map((row, index) => ( | ||
<div key={`log-list-${index}`} className="space-x-2 text-gray-300"> | ||
<span className="inline"> | ||
<FormattedDate | ||
value={row.timestamp} | ||
year="numeric" | ||
month="short" | ||
day="2-digit" | ||
/> | ||
| ||
<FormattedTime | ||
value={row.timestamp} | ||
hour="numeric" | ||
minute="numeric" | ||
second="numeric" | ||
hour12={false} | ||
/> | ||
</span> | ||
<span className="inline"> | ||
[{row.level}][{row.label}]: | ||
</span> | ||
<span className="inline">{row.message}</span> | ||
</div> | ||
))} | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can maybe re-use the table component here to make this look nice? Check out how i use it in the RequestList component.
@lochstar Are you still working on this? |
Planning on it, yes. |
Description
This implements a very basic log UI. The number of rows returned is set to 1000. I thought I'd get this in so others can pick up from it and we can decide what we'd like from the log ui.
I separated the winston transport configs to use a JSON format for the file log, using the current text-based log that we output to the console wasn't compatible with
winston.query
. We should probably set some options related to maximum files and filesize.As the format of the log
overseerr.log
has changed, we may need to purge or migrate an existing log on upgrade?Other features we could implement:
Screenshot (if UI related)
Issues Fixed or Closed by this PR