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

more log message levels #2

Open
naturallymitchell opened this issue Oct 27, 2018 · 10 comments
Open

more log message levels #2

naturallymitchell opened this issue Oct 27, 2018 · 10 comments

Comments

@naturallymitchell
Copy link
Member

From @mitchtbaum on October 13, 2018 2:28

log-message-levels
from: https://www.cisco.com/c/en/us/td/docs/routers/access/wireless/software/guide/SysMsgLogging.html

searched: log severity levels

log4jlevels
syslog-event-levels-243x300
untitled1
severity-levels-logging
node_js_logging_express_output-1464676759938
ic831263
add time between steps :)

Copied from original issue: jazzdotdev/jazz#27

@naturallymitchell
Copy link
Member Author

From @Arnaz87 on October 13, 2018 4:20

The logging support is provided by rust's log crate, it only supports the currently implemented levels

@naturallymitchell
Copy link
Member Author

notice, alert, critical, emergency
colors matching 3rd image

@naturallymitchell
Copy link
Member Author

remove log bindings and from lib.rs
keep torchbear's own logger
use log.lua in lighttouch-libs

@naturallymitchell
Copy link
Member Author

log.lua add levels ^^
ansicolors.lua add colors

underline action/rule/event name
put event, action, rule prefix in [] brackets

@naturallymitchell
Copy link
Member Author

actions and rules should have log messages including their priorities

@naturallymitchell
Copy link
Member Author

fwiw,

EMERGENCY

HTML code: #FC3C2F
RGB code: R: 252 G: 60 B: 47
HSV: 3.8° 81.35% 98.82%

ALERT

HTML code: #F4712E
RGB code: R: 244 G: 113 B: 46
HSV: 20.3° 81.15% 95.69%

CRITICAL

HTML code: | #F9A544
RGB code: | R: 249 G: 165 B: 68
HSV: | 32.15° 72.69% 97.65%

ERROR

HTML code: | #F9CE45
RGB code: | R: 249 G: 206 B: 69
HSV: | 45.67° 72.29% 97.65%

WARNING

HTML code: | #ECFA44
RGB code: | R: 236 G: 250 B: 68
HSV: | 64.62° 72.8% 98.04%

NOTICE

HTML code: | #B0DFFF
RGB code: | R: 176 G: 223 B: 255
HSV: | 204.3° 30.98% 100%

INFO

HTML code: | #6DCEFA
RGB code: | R: 109 G: 206 B: 250
HSV: | 198.72° 56.4% 98.04%

DEBUG

HTML code: | #2FB9FC
RGB code: | R: 47 G: 185 B: 252
HSV: | 199.61° 81.35% 98.82%

TRACE

?

@naturallymitchell
Copy link
Member Author

From @aleksanderwlodarczyk on October 14, 2018 2:1

There are only 256 colors available in terminal. So I couldn't match every color perfectly

@naturallymitchell
Copy link
Member Author

From @aleksanderwlodarczyk on October 14, 2018 2:2

There is strange 'bug' that we cannot use functions from Lua debug library so log.lua can't print messages with info about file and number of line

@naturallymitchell
Copy link
Member Author

From @aleksanderwlodarczyk on October 14, 2018 11:45

debug isn't working because we are using rlua and they had deleted it from rlua
mlua-rs/rlua#52

@sineemore
Copy link

From @aleksanderwlodarczyk on October 14, 2018 2:1

There are only 256 colors available in terminal. So I couldn't match every color perfectly

There are much more than that :)
Check this.

(yeah, handling color support properly is a tricky business)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants