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

CSS classes for the whole log entry #16

Closed
MojitoJoe1813 opened this issue Oct 18, 2020 · 1 comment
Closed

CSS classes for the whole log entry #16

MojitoJoe1813 opened this issue Oct 18, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@MojitoJoe1813
Copy link

For me it was very important to style the whole log entry based on severity - not only the severity itself (bc maybe I do not even show that). That wasn't possible with CSS as you were styling only the severity and by an additional span-object not used in the other log-elements.

I added the following lines in your code and replaced line 512 in main.js - works fine for me:

logObjJson.severity = "<span class='log" + newLogObject.severity.charAt(0).toUpperCase() + newLogObject.severity.slice(1) + " lpSeverity'>" + newLogObject.severity + '</span>';
logObjJson.message = "<span class='log" + newLogObject.severity.charAt(0).toUpperCase() + newLogObject.severity.slice(1) + " lpMessage'>" + newLogObject.message + '</span>';
logObjJson.date = "<span class='log" + newLogObject.severity.charAt(0).toUpperCase() + newLogObject.severity.slice(1) + " lpDate'>" + newLogObject.date + '</span>';
logObjJson.from = "<span class='log" + newLogObject.severity.charAt(0).toUpperCase() + newLogObject.severity.slice(1) + " lpFrom'>" + newLogObject.from + '</span>';

That now allows me very flexible and easy to either just style none, one specific, some or all elements of the log-entry on the respective severity (even if the severity is not shown). I would suggest to use this or something similar to allow more flexibility in styling the log-results.

@MojitoJoe1813 MojitoJoe1813 added the enhancement New feature or request label Oct 18, 2020
@Mic-M
Copy link
Owner

Mic-M commented Oct 21, 2020

Thank you for your enhancement request. Great timing, since I was anyway about to update the adapter, so I have implemented your feature request as well. Adapter version 1.1.0:

image

@Mic-M Mic-M closed this as completed Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants