Add a date+time time-stamp to each snark message. #516

Open
marek wants to merge 1 commits from marek/i2p.i2p:snark_message_timestamp into master
First-time contributor
http://git.idk.i2p/I2P_Developers/i2p.i2p/issues/515
marek added 1 commit 2025-06-12 11:10:20 -04:00
Owner

NACK

  • Use DataHelper.formatTime() which is localized and in local time zone
  • Don't reorder the imports
NACK - Use DataHelper.formatTime() which is localized and in local time zone - Don't reorder the imports
marek added 1 commit 2025-06-13 16:40:05 -04:00
Use localized date time format instead of ISO-8601.
Do not reorder imports.
Author
First-time contributor

NACK

  • Use DataHelper.formatTime() which is localized and in local time zone
  • Don't reorder the imports

Fixed.

> NACK > > - Use DataHelper.formatTime() which is localized and in local time zone > - Don't reorder the imports Fixed.
marek force-pushed snark_message_timestamp from 1e2470a87b to 32904f43c4 2025-06-22 00:02:42 -04:00 Compare
Owner
  • move log.info() above where you add the timestamp, because the logger adds its own timestamps
  • use internal time _context.clock().now() instead of System.currentTimeMillis()

still undecided if this is a good idea

- move log.info() above where you add the timestamp, because the logger adds its own timestamps - use internal time _context.clock().now() instead of System.currentTimeMillis() still undecided if this is a good idea
marek force-pushed snark_message_timestamp from 32904f43c4 to ec4a684458 2025-06-26 22:25:38 -04:00 Compare
Author
First-time contributor
  • move log.info() above where you add the timestamp, because the logger adds its own timestamps
  • use internal time _context.clock().now() instead of System.currentTimeMillis()

Fixed.

still undecided if this is a good idea

The reason I think it is a good idea is described in #515 it says that: When I come to my snark the second day, I can see bunch of snark messages. But when did they happen? Few moments ago? During the night? Yesterday? I have no idea. Did I already read them? If they are from few days ago then probably yes, if they are from today then probably no. But I have no idea when they appeared.

> - move log.info() above where you add the timestamp, because the logger adds its own timestamps > - use internal time _context.clock().now() instead of System.currentTimeMillis() Fixed. > still undecided if this is a good idea The reason I think it is a good idea is described in http://git.idk.i2p/I2P_Developers/i2p.i2p/issues/515 it says that: When I come to my snark the second day, I can see bunch of snark messages. But when did they happen? Few moments ago? During the night? Yesterday? I have no idea. Did I already read them? If they are from few days ago then probably yes, if they are from today then probably no. But I have no idea when they appeared.
Author
First-time contributor

Or, we could change the data structure holding the messages in a such way that it holds the timestamp and the message separately. So the user could decide in the settings whether they want to see the timestamp or not. (I want to see it.)

Or, we could change the data structure holding the messages in a such way that it holds the timestamp and the message separately. So the user could decide in the settings whether they want to see the timestamp or not. (I want to see it.)
Owner

I rarely want to resolve decisions by adding another config option that almost nobody will see or use.

I've been running snark with this patch for a couple weeks and IMHO it's more clutter than useful. I appreciate the contribution and that you did address my suggestions but as of now I'm leaning no.

I rarely want to resolve decisions by adding another config option that almost nobody will see or use. I've been running snark with this patch for a couple weeks and IMHO it's more clutter than useful. I appreciate the contribution and that you did address my suggestions but as of now I'm leaning no.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u snark_message_timestamp:marek-snark_message_timestamp
git checkout marek-snark_message_timestamp
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: I2P_Developers/i2p.i2p#516
No description provided.