branch: elpa/logview
commit faac12ff45ef796d4ebc9587be6abcd7c32db0aa
Author: Paul Pogonyshev <[email protected]>
Commit: Paul Pogonyshev <[email protected]>
Add JupyterLab log format to the list of those recognized automatically
(issue #61).
---
logview.el | 72 ++++++++++++++++++++++++++++++++++----------------------------
1 file changed, 40 insertions(+), 32 deletions(-)
diff --git a/logview.el b/logview.el
index f82557b0856..5ed54f5aae6 100644
--- a/logview.el
+++ b/logview.el
@@ -74,44 +74,52 @@
;; compound widget types.
(defvar logview-std-submodes
- '(("SLF4J" . ((format . "TIMESTAMP [THREAD] LEVEL NAME -")
- (levels . "SLF4J")
- (aliases . ("Log4j" "Log4j2" "Logback"))))
+ '(("SLF4J" . ((format . "TIMESTAMP [THREAD] LEVEL NAME -")
+ (levels . "SLF4J")
+ (aliases . ("Log4j" "Log4j2" "Logback"))))
;; We misuse thread as a field for hostname.
- ("UNIX" . ((format . "TIMESTAMP THREAD NAME:")))
- ("Apache Error Log" . ((format . "[TIMESTAMP] [NAME:LEVEL] [THREAD]
MESSAGE")
- (levels . "RFC 5424 lowercase")))
- ("Monolog" . ((format . "[TIMESTAMP] NAME[THREAD].LEVEL: MESSAGE")
- (levels . "RFC 5424")
- (aliases . ("PHP" "PSR-3")))))
+ ("UNIX" . ((format . "TIMESTAMP THREAD NAME:")))
+ ("Apache Error Log" . ((format . "[TIMESTAMP] [NAME:LEVEL] [THREAD]
MESSAGE")
+ (levels . "RFC 5424 lowercase")))
+ ("Monolog" . ((format . "[TIMESTAMP] NAME[THREAD].LEVEL:
MESSAGE")
+ (levels . "RFC 5424")
+ (aliases . ("PHP" "PSR-3"))))
+ ;; This doesn't seem to match what is specified at
+ ;; https://jupyter-server.readthedocs.io/en/latest/other/full-config.html,
but it does match what '$
+ ;; jupyter lab' produces. Therefore called "JupyterLab", not just
"Jupyter".
+ ("JupyterLab" . ((format . "[LEVEL TIMESTAMP NAME] MESSAGE")
+ (levels . "JupyterLab"))))
"Alist of standard submodes.
This value is used as the fallback for customizable
`logview-additional-submodes'.")
(defvar logview-std-level-mappings
- '(("SLF4J" . ((error "ERROR")
- (warning "WARN")
- (information "INFO")
- (debug "DEBUG")
- (trace "TRACE")
- (aliases "Log4j" "Log4j2" "Logback")))
- ("JUL" . ((error "SEVERE")
- (warning "WARNING")
- (information "INFO")
- (debug "CONFIG" "FINE")
- (trace "FINER" "FINEST")))
- ("RFC 5424" . ((error "EMERGENCY" "ALERT" "CRITICAL" "ERROR")
- (warning "WARNING")
- (information "NOTICE" "INFO")
- (debug "DEBUG")
- (trace)
- (aliases "syslog")))
- ("RFC 5424 lowercase" . ((error "emergency" "alert" "critical" "error")
- (warning "warning")
- (information "notice" "info")
- (debug "debug")
- (trace)
- (aliases "Apache error log"))))
+ '(("SLF4J" . ((error "ERROR")
+ (warning "WARN")
+ (information "INFO")
+ (debug "DEBUG")
+ (trace "TRACE")
+ (aliases "Log4j" "Log4j2" "Logback")))
+ ("JUL" . ((error "SEVERE")
+ (warning "WARNING")
+ (information "INFO")
+ (debug "CONFIG" "FINE")
+ (trace "FINER" "FINEST")))
+ ("RFC 5424" . ((error "EMERGENCY" "ALERT" "CRITICAL"
"ERROR")
+ (warning "WARNING")
+ (information "NOTICE" "INFO")
+ (debug "DEBUG")
+ (trace)
+ (aliases "syslog")))
+ ("RFC 5424 lowercase" . ((error "emergency" "alert" "critical"
"error")
+ (warning "warning")
+ (information "notice" "info")
+ (debug "debug")
+ (aliases "Apache error log")))
+ ("JupyterLab" . ((error "C" "E")
+ (warning "W")
+ (information "I")
+ (debug "D"))))
"Standard mappings of actual log levels to mode's final levels.
This alist value is used as the fallback for customizable
`logview-additional-level-mappings'.")