Transaction logging #23


  • Enhancment
  • Accepted
Open
Assigned to _ForgeUser7510483
  • _ForgeUser7891105 created this issue Feb 5, 2012

    I'll start off saying I really love your DuckShop Plugin. The Fill-O-Meter was a great addition. The Plugin is simple, easy to use, and convenient. One thing that would put your plugin on top of all the other shop plugins, is Shop History. Now I was thinking this could be very simple to add, but then again I'm not a Java Genius.


    I don't believe any other Shop plugin has a history. I know this might be memory consuming considering that big servers would have ton's of logs. Though I think the plugin should wipe the logs of the purchases/sells every week or better yet have it configurable. I'm guessing you could consider using a MySQL Database to input the logs, or in a SQL flat file, heck better yet maybe it can be configured to use either one.


    Now I'll go more in depth into this. I'm not saying to have a giant list of every time a person clicks a sign, cause that would just be to lengthy. So if Bob bought 10 Dirt 6 times from Sue, and Sue typed /duckshop history it would say this: Bob bought 60 Dirt for $1. So say the plugin listens in on the buyer until he's done then waits for 10 seconds to log it. If the buyer continues to buy before the 10 seconds is up it will keep adding it to the one log instead of every-time he clicks the sign.

    Example: If Bob buys 10 Dirt the plugin waits 10 second's before it logs it, but if Bob click the sign before the 10 seconds it will add it on top of the previous buy until the 10 seconds are up. (The Amount paid would also add up)


    So the format would kinda be like this:

    • [Buyer] bought [Amount] [Item/ID] for [X Amount of $] (Buying items from you)
    • [Seller] sold you [Amount] [Item/ID] for [X Amount of $] (Selling items to you)

    Also some color couldn't hurt :)


    In Conclusion:

    • MySQL or FlatFile
    • /duckshop history
    • [Buyer] bought [Amount] [Item/ID] for [X Amount]
    • Maybe a little color throughout the plugin
    • History Log's removed by default every week (configurable)
    • Log's of buying
  • _ForgeUser7891105 added the tags New Enhancment Feb 5, 2012
  • _ForgeUser7510483 posted a comment Feb 5, 2012

    Great idea, Tonkovich!

    The problem is, logging is a "cross-cutting concern", meaning adding it would require changing code all over the place. That's why other coders aren't so keen to do it.

    I am actually planning on adding a more flexible event system to DuckShop. Rather than doing everything itself, it can let other plugins hook into it and do any logging themselves, keeping the core code manageable.

    I'm working on another project right now, so feel free to implement it yourself :)

  • _ForgeUser7510483 removed a tag New Feb 5, 2012
  • _ForgeUser7510483 added a tag Accepted Feb 5, 2012
  • _ForgeUser7510483 posted a comment Apr 19, 2012

    Removed spam magnet. Don't post emails in public, bra. ;)


    Edited Apr 19, 2012
  • _ForgeUser7510483 edited description Apr 19, 2012

To post a comment, please login or register a new account.