diff options
-rw-r--r-- | elogt.el | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -123,15 +123,19 @@ A logfile priority level is one of: None, Info, Warn, Error." (defun elogt--logfile-properties (file-name) "Extract the properties form given FILE-NAME." - (let* ((splitted-file-name (split-string (file-name-base file-name) ":")) - (category (car splitted-file-name)) - (package (cadr splitted-file-name)) - (time (caddr splitted-file-name))) - (vector (elogt--logfile-priority-level file-name) - category - (propertize package 'face 'bold) - (propertize time 'face 'italic) - (elogt--file-size file-name)))) + (let ((splitted-file-name (split-string (file-name-base file-name) ":"))) + (cond + ((= (length splitted-file-name) 3) + (let ((category (car splitted-file-name)) + (package (cadr splitted-file-name)) + (time (caddr splitted-file-name))) + (vector (elogt--logfile-priority-level file-name) + category + (propertize package 'face 'bold) + (propertize time 'face 'italic) + (elogt--file-size file-name)))) + (t + (make-vector 5 ""))))) (defun elogt--make-log-table-contents () "Make ElogT table contents." |