> @Mark S
> Logging is something I've been very interested in at various points in
> the past, usually when an application goes wrong in production and I
> have to figure out what went wrong!
>
> I think we need to discard the notion that logs should be timestamped

I still like timestamps even with per-user logging. Since each user
has its ownfile yyyy-mm-dd/userid the timestamp per line only needs to
contain HH:MM:SS.
Each day a new directory/file is created as needed. So log files don't
grow toolarge. Another thread removes dirs/files older than 30 days.

> strings outputted to a file. Instead, I think they should be hash-maps
> we send to a logging server, which then stores them in a database.

I prefer files. Using a DB prevents me from using existing powerful
tools to search and query the logs: vim and emacs.
The nice thing about per-user logging files is that they don't get
that big. They are quick to load/search/analyze.

> You could then visit the database and say "Show me all exceptions that
> occurred for user X". You could then select the field you wanted and
> say "Show me all log messages that occurred within the context of the
> same request as this exception". This is something that would have
> saved me a lot of pain in the past.

Wrt context: per-user logging data is written serially so it's easy to
figure out the context/progression of events that lead up to the
exception. You know where one request starts and ends.

FYI: we use the STM to queue up requests in a map and flush each
user's loggingdata to disk every few seconds.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to