[INACTIVE][CHAT/ADMIN] ChatLogger v0.5 - log the chat [860]

Discussion in 'Inactive/Unsupported Plugins' started by Cr3dos, May 9, 2011.

  1. Offline


    Name: ChatLogger
    Version: 0.5 (Beta version, because I want to test it on diffrent Systems)
    Bukkit: 860

    This Plugin logs the chat

    Jar: http://dl.dropbox.com/u/6613106/ChatLogger.jar
    Source: https://github.com/cr3dos/ChatLogger

    • Log the chat in a .txt File in the Plugin Ordner(ever Day a new one)
    • On/Off switch
    • Format
    Format the Output
    insert in the config.yml this line: format: 'theFormatYouWant'
    Keys are {date} {player} {msg} {world}
    example: format: '{date}: [{world}] {player}: {msg}

    Command (need OP)
    • cl: switch on/off logging
    • clset delDays <int> (After how many days the log Files should be deleted(value between 1 and 13) 1 day mean not 24h(on the next morning(00.00) the folder will be deleted))
    • clset worldName (show in the log file the worldname)
    • clset commands (log the commands)
    • clset playerOnServer (log join, quit and kick)
    • Add Permission support
    • maybe split the log file
    • Fix Bugs
    • The plugin create the folder ChatLogger
    • In this folder you find the conifg.yml file
    • and more folders for every day in format: mm_dd_yyyy
    • In this folde are the daily logs

    If you found an error or want a new feature let me know

    Version 0.1
    • Release the Beta
    Version 0.2

    • Add loggin cmds
    • Add some settings
    Version 0.3

    • Add log player join, player quit and player kick
    • Bug fixing
    Version 0.4
    • Add the format
    Version 0.5
    • Dollar fix
  2. Offline


    Thank you so much! This will be very helpful. I'll get back to you with any improvements or bugs. :D

    EDIT: How about just making one folder, and txt files with the date?
    And this is what I got after turning it on, then saying something:
    07:02 PM: ChatLogger set on byrenxwar
    07:02 PM: [world]renxwar TESTING BLAAAAH
    Instead of that, how about this:
    07:02 PM: ChatLogger set on by renxwar
    07:02 PM: renxwar: TESTING BLAAAAH
    Like a configurable option to put if you want the worldname on there, and the space after 'by'. As well as a colon after the playername.
  3. Offline


    Thank you for your help. I will add this Features and upload the update as soon as I have time.

    Edit: I added the features
  4. Offline


    Could you possibly include MySQL Support and a php page for people to view the chat logs?
  5. Offline


    MySQL would ruin this plugin, it's not needed.

    Nice plugin, I'll probably be using this soon.
  6. Offline


    it could be a option not a forced method of log... Saves server space and prevents lag... Would IMPROVE plugin performance rem
  7. Offline


    How would it save server space and prevent lag? Please explain as I think you have no idea what you're talking about.
  8. Offline


    Well writing to a 'flatfile' takes up server disk space and causes lag writing to a file which the server is running on. By conecting to another server it prevents lagg
  9. Offline


    Can you log players joining, and players leaving?
  10. Offline


    I can add the features to log joining leaving ... Edit: DONE
    I will think about the MySQL-Database and PHP-Webpage
    gamingvortex likes this.
  11. Offline


    1) Where do you think MySQL stores its data? Clue: it's a file.
    2) Adding the overhead of connecting to a remote database and submitting data frequently is a hell of a lot more likely to cause "lag" than writing to the local filesystem.
    3) Even if it was the local database, you still have to send the data via the MySQL adapter, adding significantly more overhead than a simple file write.

    MySQL would be useful if the plugin needed to read the data back out

    If you want to continue this discussion, PM me. I don't want to hijack Cr3's thread any longer and I'll ignore any replies you post here.

    Any chance you could chuck in a configurable format? Something in the config that says:

    [{date}] {player}: {message}

    Where the strings "{date}", "{player}" and "{message}" would be replaced with actual data?


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jul 16, 2016
  12. Offline


    nice idea. I will add this feature when I have time
  13. Offline


    Good idea, but mysql is not necessary. a log file is simple enough :)
  14. Offline


    please update to latest recommended CB
  15. Offline



    Format added

    insert in the config.yml this line: format: 'theFormatYouWant'
    Keys are {date} {player} {msg} {world}
  16. Offline


    moved the changelog to the end
  17. Offline

    Dead Fred

    • maybe split the log file
    Sounds really help full =]
  18. i get an Config file, but nothing in it.
    is this normal?
    if so, what do i have to put in it?
  19. Offline


    you can everything handle by command, but here is a sample:

    logging: 'true'
    delDays: '6'
    worldName: 'false'
    commands: 'true'
    playerOnServer: 'true'
    format: '{date}[{world}] {player}: {msg}'

    • logging means the plugin should log the chat/commands true = yes
    • delDays: after how many days the log should be deleted
    • worldName mean show the worldName in the output (only if you don't hava the format property)
    • commands: log commands true = yes
    • playerOnServer mean should the plugin log join, kick, quit of a player
    • format is how the output will be formated {date} {wolrd} {player} {msg} are keys. They will be replaced by the date, worldname, playername and the message.If you don't want the worldname don't use it in the format
    @Dead Fred any idea when the plugin should split the Files. after xxx lines or storage?
  20. Offline


    This was working great! Until i found out it threw an error every time a player typed a $ symbol :(
  21. Offline


    Can you show me the error from the server log.
  22. Offline


    Is it possible that
    -I only had one large log
    -the time without PM just e.g. 18:51?
    -and perhaps seconds 18:51:21

    format: '{day}|{date}|{world}|{player}|{msg}'

    2011-05-30|11:25:59|gretna green|PinkHell|123
    2011-06-01|15:56:24|gretna green|PinkHell|456
    2011-06-02|06:12:35|gretna green|PinkHell|789
    2011-06-02|06:03:02|gretna green|PinkHell|012
  23. Offline


    one large log? Are you sure?
    Maybe I will add the option for one logfile
    PinkHell likes this.
  24. Offline


    The $ error, as requested.

  25. Offline


    Sorry, I didn't have much time last week. Update is out.
  26. Offline

    Martyn Cooksey

    This is a handy little plugin, thanks dev!
  27. Offline


    I hope that you will integrate MySql support :D This plugin is what was missing to really exploit minecraft chat without an IRC channel or other heavy ways... Really Thanks You @Cr3dos
  28. Offline


    You should make the commands work from console. I'm getting these errors :

    2011-06-21 09:27:36 [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'clset' in plugin ChatLogger v0.5
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:128)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:279)
        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:428)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:413)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.command.ColouredConsoleSender cannot be cast to org.bukkit.entity.Player
        at me.cr3dos.ChatLogger.Command.CLSetCommand.onCommand(CLSetCommand.java:37)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 6 more
  29. Offline


    I just verified the logs to see what had been captured up to now. My log on date 21 contains data up to 6AM within the 22nd.

    I am suppose it needs a restart to change folder, which it shouldn't need. If I'm searching for log from the 22nd I'll check on the 22nd not the 21st.
  30. Offline


    Agreed - Needs to start a new log automatically, not when I restart/reload the server.

Share This Page