Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Sort log files in descending order. #84

Merged
merged 1 commit into from

2 participants

@hyPiRion

Log files for IRC-channels aren't sorted, and the result is that it is hard to find the date you're looking for. This pull request sort the log files in descending order (newest date first), based on the assumption that every file is on the form yyyy-mm-dd.txt.

@Raynes Raynes merged commit 9ab5bac into Raynes:develop
@hyPiRion hyPiRion deleted the hyPiRion:sort-logs-descending branch
@Raynes
Owner

Why thank you kind sir. Your changes are already live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 9, 2013
  1. @hyPiRion
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/lazybot/plugins/logger.clj
View
6 src/lazybot/plugins/logger.clj
@@ -112,9 +112,9 @@
(list
[:h1 "Logs for " channel " on " server]
[:ol
- (map (fn [log]
- [:li (link log server channel log)])
- logs)]))))
+ (->> logs
+ (sort (fn [a b] (compare b a)))
+ (map (fn [log] [:li (link log server channel log)])))]))))
(defn server-index
"A hiccup doc describing logs on a server."
Something went wrong with that request. Please try again.