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

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

  1. Offline

    Cr3dos

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

    This Plugin logs the chat

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

    Features
    • 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)
    Future
    • Add Permission support
    • maybe split the log file
    • Fix Bugs
    Folders
    • 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
    Important

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

    Changelog
    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

    renxwar

    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:
    Code:
    07:02 PM: ChatLogger set on byrenxwar
    07:02 PM: [world]renxwar TESTING BLAAAAH
    
    Instead of that, how about this:
    Code:
    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

    Cr3dos

    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

    gamingvortex

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

    SirHedgehog

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

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

    gamingvortex

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

    SirHedgehog

    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

    gamingvortex

    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

    renxwar

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

    Cr3dos

    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

    SirHedgehog

    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:

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

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

    Thanks.

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

    Cr3dos

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

    cronikkk

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

    Plague

    please update to latest recommended CB
     
  15. Offline

    Cr3dos

    Done

    Format added

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

    Plague

    moved the changelog to the end
     
  17. Offline

    Dead Fred

    Future
    • 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

    Cr3dos

    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

    Crete21

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

    Cr3dos

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

    PinkHell

    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

    e.g.
    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

    Cr3dos

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

    Odjit

    The $ error, as requested.


     
  25. Offline

    Cr3dos

    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

    dragonhib

    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

    ZachBora

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

    Code:
    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

    ZachBora

    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

    weepingboil

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

Share This Page