Skip to content

Commit b74cc5c

Browse files
committed
Add Android log mode (by Jim Paris). (issue #51)
1 parent 50cac3f commit b74cc5c

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

logview.el

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@
7777
'(("SLF4J" . ((format . "TIMESTAMP [THREAD] LEVEL NAME -")
7878
(levels . "SLF4J")
7979
(aliases . ("Log4j" "Log4j2" "Logback"))))
80-
;; We misuse thread as a field for hostname.
81-
("UNIX" . ((format . "TIMESTAMP THREAD NAME:")))
8280
("Apache Error Log" . ((format . "[TIMESTAMP] [NAME:LEVEL] [THREAD] MESSAGE")
8381
(levels . "RFC 5424 lowercase")))
8482
("Monolog" . ((format . "[TIMESTAMP] NAME[THREAD].LEVEL: MESSAGE")
@@ -88,7 +86,11 @@
8886
;; https://jupyter-server.readthedocs.io/en/latest/other/full-config.html, but it does match what '$
8987
;; jupyter lab' produces. Therefore called "JupyterLab", not just "Jupyter".
9088
("JupyterLab" . ((format . "[LEVEL TIMESTAMP NAME] MESSAGE")
91-
(levels . "JupyterLab"))))
89+
(levels . "JupyterLab")))
90+
("Android" . ((format . "TIMESTAMP THREAD IGNORED LEVEL NAME: MESSAGE")
91+
(levels . "Android")))
92+
;; We misuse thread as a field for hostname. Placed last to avoid clobbering more specific formats.
93+
("UNIX" . ((format . "TIMESTAMP THREAD NAME:"))))
9294
"Alist of standard submodes.
9395
This value is used as the fallback for customizable
9496
`logview-additional-submodes'.")
@@ -119,7 +121,12 @@ This value is used as the fallback for customizable
119121
("JupyterLab" . ((error "C" "E")
120122
(warning "W")
121123
(information "I")
122-
(debug "D"))))
124+
(debug "D")))
125+
("Android" . ((error "E")
126+
(warning "W")
127+
(information "I")
128+
(debug "D")
129+
(trace "V"))))
123130
"Standard mappings of actual log levels to mode's final levels.
124131
This alist value is used as the fallback for customizable
125132
`logview-additional-level-mappings'.")
@@ -138,7 +145,8 @@ This alist value is used as the fallback for customizable
138145
(nil "EEE MMM dd HH:mm:ss.SSSSSS yyyy")
139146
(nil "MMM d HH:mm:ss")
140147
(nil "MMM d h:mm:ss a")
141-
(nil "h:mm:ss a")))
148+
(nil "h:mm:ss a")
149+
(nil "MM-dd HH:mm:ss.SSS")))
142150
(push (list (or (car data) (cadr data)) (cons 'java-pattern (cadr data))) formats)
143151
(when (string-match-p "\\." (cadr data))
144152
(nconc (car formats) '((datetime-options :any-decimal-separator t))))

0 commit comments

Comments
 (0)