Opened 7 years ago

Last modified 9 months ago

#9482 new enhancement

Include dates in logs, or restart logs daily at midnight

Reported by: macnewbold Owned by: rlaager
Milestone: Component: logging
Version: 2.5.7 Keywords: logs dates timestamps
Cc: Dawudd

Description (last modified by macnewbold)

When a conversation or chat is open across one or more date boundaries, the log file becomes hard to use, because one can no longer easily tell which date the logged time refers to. For example, I frequently leave IRC chats, and even some IM conversations, open for days or weeks at a time, and the only date stored in my logs is the date that the conversation/chat was originally opened.

While possible to put the date on every line next to the time, I think it would be preferable to show the current date every time a new entry is from a different day than the previous entry. Or perhaps it might be more simple to output the current date to every open log file at midnight each day. That would accomplish roughly the same thing, the only difference being that it would show a date in the log even if there was no activity during that day.

Another possibility is that any open log files should be closed at midnight and reopen a new log each day. Then the view/search logs features could show the logs by the actual day the message was sent, rather than just the day that log file was opened.

Change History (11)

comment:1 Changed 7 years ago by deryni

  • Status changed from new to pending

If you want any sort of reliable information about when any given message was sent or received you really need per-message timestamps. Otherwise the logs (even with date change markings) will only tell you what day a conversation occurred on with no indication of time of day, and I do not particularly understand the necessity to know the day/date of a message without also wanting to know time of day.

That being said, the pp:wiki:irssi plugin provides day-change notices which may or may not get logged, if they do not it should possible to modify it so that they are.

It would also be possible to write an alternative logging plugin which automatically broke logs up when the day changed (assuming the last message in the conversation was more than X minutes ago, to avoid breaking up an active conversation).

comment:2 Changed 7 years ago by macnewbold

  • Status changed from pending to new
  • Version changed from 2.5.5 to 2.5.7

I don't recall if I already have a plugin or a preference option doing something with it, but my logs have included a timestamp on each message like this:

(09:30:01) <username>: <message>

So that part is already covered by some feature that is available in the core or in one of the default plugins. I confirmed that it is this way in 2.5.7 as well as 2.5.5, though in 2.5.7 it appears to use (9:30:01 AM) and (4:25:39 PM) for timestamps in the logs, which is a bit annoying. I don't see anywhere that I can choose the timestamp format (12 hr vs 24 hr), but I also can't find anywhere that I can turn on or off the logging of message timestamps, now that I go looking for it. It's hard for me to remember what versions have supported what, because I've been using pidgin and gaim for many years now, since some pretty old 1.x versions, and can't remember what's where. After getting my config right, I haven't had to change it much.

comment:3 Changed 7 years ago by macnewbold

Oops, that was odd. I set the status flag to "leave as pending" but it flipped it back to new again... maybe the version change caused that inadvertently. Sorry!

comment:4 Changed 7 years ago by deryni

  • Status changed from new to pending

The pending -> new change is normal, don't worry about it. pending means we are waiting on the reporter for a response, any response unsets pending.

The first timestamp after a day change doesn't include the full date? I thought it did.

Either way, the timestamp format is controlled by your locale and the Message Timestamp Format plugin can make some small changes. You may want to look into that (if you want the full time/date stamped on each message). Otherwise the irssi plugin day-change message may be what you want.

comment:5 Changed 7 years ago by macnewbold

  • Status changed from pending to new

I just grabbed the plugin pack with the irssi plugin, and it specifically states that the day change message is not logged. :(

The Message Timestamp Format plugin does give me the 12hr/24hr switch I was looking for, so thank you!

comment:6 Changed 7 years ago by deryni

  • Status changed from new to pending

I don't see what says that and I was specifically told (as a result of my lack of certainty originally) that it is logged. So whatever you are reading may just be old, try it and see.

comment:7 Changed 7 years ago by macnewbold

  • Status changed from pending to new

I just downloaded and installed the latest plugin pack (Windows DLLs zip file) this morning, and it is the plugin description for "IRSSI Features" plugin, v2.5.1, that states specifically:

"The day changed message is not logged."

I guess it is possible that the zip file of DLLs is not the most current version, in which case shame on them :)

I'll leave some conversations open overnight tonight to see if it logs the day change.

comment:8 Changed 7 years ago by deryni

  • Status changed from new to pending

comment:9 Changed 7 years ago by macnewbold

  • Description modified (diff)
  • Status changed from pending to new
  • Summary changed from Include dates in logs to Include dates in logs, or restart logs daily at midnight

I confirmed this morning that the plugin "IRSSI Features" does indeed _display_ the day change, but does _not_ log the day change message.

I don't much care whether this feature request becomes a part of that plugin or gets implemented in the core or something else, but I still would like to see it happen. All the log entries have times, but without knowing what date they're for, it gets a little confusing sometimes.

Another possibility here is that by logging date on every message is that the view/search logs features could show the logs by the day the message was sent, rather than just the day that log file was opened.

Another possibility that I would like just fine, and maybe even better than what I thought I wanted, is that any open log files should be closed at midnight and reopen a new log each day.

comment:10 Changed 7 years ago by deryni

  • Owner changed from rekkanoryo to rlaager

I believe pidgin should be showing the first message after a day change (and possibly the first message received after a "long" break). If that isn't happening, and it didn't seem to be in a 'quick' test of a break. I consider that a bug and it should be fixed.

The irssi day-change feature should probably support writing that information to the log, but that is something you would have to take up with the plugin pack authors.

Like I said, you can always forcibly turn on dates for every message as well.

The log viewer shows logs by log entry, using whatever the current logger defines as a log entry. A custom logger could log by day or whatever else it wanted and return logs in whatever units it wanted to.

That's a custom logger again.

rlaager: I'm assigning this to you in case there is in fact a date logging bug here, since you dealt with logging stuff last as I recall.

comment:11 Changed 9 months ago by dx

  • Component changed from unclassified to logging
Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!