Skip to content
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

Shorten web log output #40

Open
OmgImAlexis opened this issue Oct 21, 2021 · 1 comment
Open

Shorten web log output #40

OmgImAlexis opened this issue Oct 21, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@OmgImAlexis
Copy link

Instead of showing the full link at the end of the log maybe [COM ID] could link to it?

@OmgImAlexis OmgImAlexis changed the title Shorten log output Shorten web log output Oct 21, 2021
@FoxxMD
Copy link
Owner

FoxxMD commented Oct 21, 2021

I like the idea but it would require some low-level refactoring. I use winstonjs's label feature to generate those prefixes for logs. Might be easy to do by adding extra meta information to the log object but will need to either a) associate it with the label by id-mapping of some sort or b) make labels objects instead of strings

Then in console/stream transports we would be able to control the transform of the log object to the final string -- could add an additional transport specifically for web that transforms into html. I'm already doing this in a roundabout way for log level colors but its separate from winstonjs atm.

@FoxxMD FoxxMD added enhancement New feature or request help wanted Extra attention is needed labels Oct 21, 2021
FoxxMD added a commit that referenced this issue Jan 18, 2022
* Add options for /logs endpoint to stream objects instead of strings
* Always return log objects from /status endpoint -- fixes bug where all bots/subreddits got lines from logs that had newlines
* Return context-aware, formatted log lines to client to reduce line length IE if returning to botA -> subA then do not need to include labels for botA,subA #40
* Shorten timestamp to just time and wrap full timestamp in tooltip #40
* Emit log objects to client to reduce parsing complexity (don't have to regex for bot/subreddit name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants