Last active
September 5, 2017 06:55
-
-
Save svelleweetakealot/f58f4baffc0345010317766139535a4e to your computer and use it in GitHub Desktop.
Kube grep dates elisp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun kubernetes-re-log () | |
(message "test") | |
(set-buffer "*kubernetes logs*") | |
(message "buffer name %s" (buffer-name)) | |
(goto-char (point-min)) | |
(save-current-buffer | |
(set-buffer (get-buffer-create "*dump log*")) | |
(erase-buffer)) | |
(while (re-search-forward "\\([0-9]+\-[0-9]+\-[0-9]+T[0-9]+:[0-9]+:[0-9]+ .*\\)" nil t) | |
;;(message "hello %s" (match-string 0)))) | |
(let (( match (match-string 0))) | |
(save-current-buffer | |
(set-buffer (get-buffer-create "*dump log*")) | |
;;(erase-buffer) | |
(insert (format "hello [%s]\n" match)))))) | |
(run-with-timer 0 10 'kubernetes-re-log) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment