Skip to content

Conversation

@psychedelicious
Copy link
Contributor

@psychedelicious psychedelicious commented Apr 29, 2023

  • Add logging via roarr
    • add hook for use in components
    • also just export the logger so we can access it in middleware etc
    • roarr wants its settings (on/off and the filter) to be stored in localStorage. we can write a custom storage adapter to store them in redux if we want but this is fine for now
  • Add log level select to system settings
  • Logs are not persisted across reloads, they are ephemeral and live in the browser console. With the upcoming logging put together by @lstein we can have some proper structured logs on the backend. So on the UI, we will log UI specific things only. This does not need to be persisted, and means our localStorage usage will substantially decrease. May even speed up the redux persistence layer.
  • Remove Console component and the redux-based log

log contexts

see the docs linked above, but in short, to the logger context, we will add a namespace (the module/function/category of the log), maybe a payload, and a message. roarr's browser log writer takes care of formatting.

also, we can use printf style formatting, but I haven't done that yet.

log levels

current usage of log levels (there are others, just haven't needed them yet). this is all easily changed

trace

only for generator progress - it spits out a bazillion of these

debug

socket connectivity events

info

other socket events, api calls

error

invocation errors

@psychedelicious psychedelicious merged commit d00d29d into main Apr 29, 2023
@psychedelicious psychedelicious deleted the feat/ui/logging branch April 29, 2023 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants