aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elogt.el22
1 files changed, 13 insertions, 9 deletions
diff --git a/elogt.el b/elogt.el
index f5d7fd9..a067747 100644
--- a/elogt.el
+++ b/elogt.el
@@ -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."