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

πŸ”¨ Better log highlighting #2369

Merged
merged 13 commits into from
Jan 15, 2024
Merged

Conversation

BadWolf42
Copy link
Contributor

@BadWolf42 BadWolf42 commented Jan 14, 2024

Proposed change

Following this thread: https://community.jeedom.com/t/tags-dans-les-logs-plus-interpretes-en-4-4-beta/118531/49?u=bad

  • Ban all HTML codes in logs (already the case previously),
  • Highlighted "keywords" in the logs:
    • [DEBUG] -> <span class="label label-xs label-success">DEBUG</span>
    • [INFO] -> <span class="label label-xs label-info">INFO</span>
    • [NOTICE] -> <span class="label label-xs label-info">NOTICE</span>
    • [WARNING] -> <span class="label label-xs label-warning">WARNING</span>
    • [ERROR] -> <span class="label label-xs label-danger">ERROR</span>
    • [CRITICAL] -> <span class="label label-xs label-danger">CRITI</span>
    • [ALERT] -> <span class="label label-xs label-danger">ALERT</span>
    • [EMERGENCY] -> <span class="label label-xs label-danger">EMERG</span>
    • WARNING: -> <span class="warning">WARNING</span>
    • [ OK ] -> <span class="label label-xs label-success">[&nbsp;&nbsp;OK&nbsp;&nbsp;]</span>
    • [ KO ] -> <span class="label label-xs label-danger">[&nbsp;&nbsp;KO&nbsp;&nbsp;]</span>
    • Erreur -> <span class="danger">Erreur</span>
    • OK -> <strong>OK</strong>
  • Tags to highlight the logs:
    • BackGround color:
      :bg-success: β†’ <span class="label label-success">
      :bg-info: β†’ <span class="label label-info">
      :bg-warning: β†’ <span class="label label-warning">
      :bg-danger: β†’ <span class="label label-danger">
      :/bg: β†’ </span>
    • ForeGround color:
      :fg-success: β†’ <span class="success">
      :fg-info: β†’ <span class="info">
      :fg-warning: β†’ <span class="warning">
      :fg-danger: β†’ <span class="danger">
      :/fg: β†’ </span>
    • Bold: :b: -> <b> & :/b: -> </b>
    • Strong: :s: -> <strong> & :/s: -> </strong>
    • Italic: :i: -> <i> & :/i: -> </i>
    • Line feed: \r\n & \n & :br: -> <br>
    • Comments : :hide: -> <!-- & :/hide: -> -->
  • Fix search fields and buttons,
  • Minor types or coding style fixes

Type of change

  • Bugfix (non breaking change)
  • Core new feature
  • UI new functionality
  • Code quality improvements

Test check

Tested on Jeedom Core 4.4.1 72e5f6d
On global logs, scenario logs, plugin logs, modals
With or without colors
With or without search

Documentation

N/A

BadWolf42 added a commit to BadWolf42/core that referenced this pull request Jan 14, 2024
@BadWolf42 BadWolf42 mentioned this pull request Jan 14, 2024
2 tasks
@zoic21 zoic21 merged commit 002863c into jeedom:alpha Jan 15, 2024
4 checks passed
zoic21 added a commit that referenced this pull request Jan 15, 2024
@BadWolf42 BadWolf42 deleted the highlight-logs branch January 15, 2024 10:07
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.

None yet

2 participants