πŸ“‹Transaction Logging

Track all shop transactions for security and analysis!


Overview

Transaction Logging records all buy/sell transactions to files and optionally to Discord. This helps with:

  • Tracking player activity

  • Detecting exploits

  • Analyzing economy flow

  • Resolving disputes


Configuration

Edit plugins/InfiniteShops/transaction-log.yml:

# Transaction Logging Configuration

enabled: true

# File logging
file:
  enabled: true
  # Log file location
  path: "logs/transactions"
  # Date format for file names
  date_format: "yyyy-MM-dd"
  # Log format
  format: "[%time%] %player% %action% %amount%x %item% for %price% (%currency%)"

# Discord logging (requires DiscordSRV)
discord:
  enabled: false
  channel_id: "123456789012345678"
  
  # Embed settings
  embed:
    buy_color: "#00FF00"
    sell_color: "#FF6600"
    show_timestamp: true
    show_location: false

File Logging

Log Location

Logs are stored in:

Log Format

Each line contains:

Log Fields

Field
Description

%time%

Transaction time

%player%

Player name

%action%

BUY or SELL

%amount%

Item quantity

%item%

Item name

%price%

Transaction price

%currency%

Currency type

%location%

Shop location

%shop%

Shop name


Discord Logging

Requirements

Setup

  1. Install and configure DiscordSRV

  2. Get your channel ID (Developer Mode β†’ Right-click channel β†’ Copy ID)

  3. Configure InfiniteShops:

Embed Format


Commands

Command
Description

/transactionlog reload

Reload configuration

/transactionlog status

Show logging status

/transactionlog test buy

Send test buy log

/transactionlog test sell

Send test sell log

/transactionlog toggle file

Toggle file logging

/transactionlog toggle discord

Toggle Discord logging

Status Command

Output:


Log Types

Standard Transactions

Normal buy/sell from GUI shops:

Sign Shop Transactions

NPC Shop Transactions

Black Market Transactions

Daily Shop Transactions


Advanced Configuration

Custom Log Format

Separate Log Files

Log Rotation


Permissions

Permission
Description
Default

infiniteshops.transactionlog.admin

Admin commands

op


Security Notes

  1. Protect log files - They contain player activity

  2. Regular backups - Logs are valuable for disputes

  3. Discord channel - Make it staff-only

  4. Review regularly - Look for suspicious patterns


Troubleshooting

Logs Not Creating

  1. Check file.enabled: true

  2. Verify folder permissions

  3. Check for disk space

Discord Not Working

  1. Verify DiscordSRV is installed

  2. Check channel ID is correct

  3. Verify bot has permissions in channel

  4. Run /transactionlog test buy


Tips

  1. Archive old logs - Set up log rotation to save space

  2. Staff-only Discord channel - Protect player activity data

  3. Review weekly - Look for unusual patterns

  4. Custom format - Tailor logs to your analysis needs

  5. Backup regularly - Logs are valuable for dispute resolution

Last updated