Plugin Request Simple File Logger

Discussion in 'Plugin Help/Development/Requests' started by LemonGraham, Jan 24, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    LemonGraham

    If this already exists, I'd love to know ^_^

    Plugin category: Admin Tools

    Suggested name: File Logger

    What I want:

    I would like a plugin that can log specific text to a chosen .txt or .log file. For example, If the player triggers a command block, and the command block has "/log add CommandBlock {player} has pressed a button!", the plugin would make the command block add the like of text to CommandBlock.txt

    I'm currently having the system /mail me for every notification I need, but it's too much spam for me now. This plugin could also be used for notes, like "/log add Notes Notch owes me $5!"

    Automations could be an extra feature, as in automatically add info to every log post without being specifically told (Time, date, and player name would be nice). Customization would be amazing too
    Ideas for commands: /log add [name of file] [text to add]
    /log delete [name of file] [latest number of lines, or all]
    /log read [name of file]

    Ideas for permissions: filelogger.[command name]
    filelogger.*

    Thank you ^_^
     
  2. Offline

    pie_flavor

    @LemonGraham This will be done within the hour.

    Logger.jar
    Just barely within the hour.

    EDIT by Timtower: merged posts
     
    Last edited by a moderator: Jan 25, 2015
  3. Offline

    LemonGraham

    Thank you for the fast reply, but on testing it, it doesn't work. I put it in my plugins folder and restarted the server, twice, and it doesn't show in /help, /pl, or create a folder in the plugins directory
     
  4. Offline

    pie_flavor

    @LemonGraham That's strange. Is there anything in the log? usually this happens if I screwed up plugin.yml or if you are using an older version of Java, otherwise it'd at least load.
     
  5. Offline

    LemonGraham

    It just says it doesn't load

    ERROR Could not load 'plugins/Logger.jar' in folder 'plugins

    I put a little bit of the console inside this spoiler. It's an Cauldron server running Pixelmon

    Show Spoiler
    25.01 23:10:06 [Server] INFO ... 12 more 25.01 23:10:06 [Server] INFO at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:899) ~[PluginDescriptionFile.class:?] 25.01 23:10:06 [Server] INFO Caused by: java.lang.NullPointerException 25.01 23:10:06 [Server] INFO at java.lang.Thread.run(Unknown Source) [?:1.7.0_72] 25.01 23:10:06 [Server] INFO at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:620) [MinecraftServer.class:?] 25.01 23:10:06 [Server] INFO at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:329) [lt.class:?] 25.01 23:10:06 [Server] INFO at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:356) [MinecraftServer.class:?] 25.01 23:10:06 [Server] INFO at net.minecraft.world.WorldServer.<init>(WorldServer.java:153) [mt.class:?] 25.01 23:10:06 [Server] INFO at net.minecraft.world.World.<init>(World.java:350) [ahb.class:?] 25.01 23:10:06 [Server] INFO at net.minecraft.world.storage.SaveHandler.func_75757_d(SaveHandler.java:136) [ayq.class:?] 25.01 23:10:06 [Server] INFO at net.minecraft.world.storage.SaveHandler.initBukkitData(SaveHandler.java:458) [ayq.class:?] 25.01 23:10:06 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:320) [CraftServer.class:?] 25.01 23:10:06 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [SimplePluginManager.class:?] 25.01 23:10:06 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:193) ~[JavaPluginLoader.class:?] 25.01 23:10:06 [Server] INFO at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:232) ~[PluginDescriptionFile.class:?] 25.01 23:10:06 [Server] INFO at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:901) ~[PluginDescriptionFile.class:?] 25.01 23:10:06 [Server] INFO org.bukkit.plugin.InvalidDescriptionException: version is not defined 25.01 23:10:06 [Server] ERROR Could not load 'plugins/Logger.jar' in folder 'plugins'
    25.01 23:10:05 [Server] INFO Injected new Forge item material PIXELMON_ITEMGIFT_BOX with ID 4582. 25.01 23:10:05 [Server] INFO Injected new Forge item material PIXELMON_ITEMDAWN_STONE_SHARD with ID 4581. 25.01 23:10:05 [Server] INFO Injected new Forge item material PIXELMON_ITEMDAWN_STONE with ID 4580. 25.01 23:10:05 [Server] INFO Injected new Forge item material PIXELMON_ITEMDUSK_STONE with ID 4579.
     
  6. Offline

    pie_flavor

    First of all: 1.6.4 cauldron pixelmon? That would be a good thing to say at the beginning, considering that this should be in a separate section (Plugin Alternatives).
    Second of all: I was trying to be interesting by putting an omega symbol as the version. Redownload for fix.
     
  7. Offline

    LemonGraham

    You're completely right, I should have posted what version of minecraft this was for, but it's 1.7.10 (Pixelmon updated)
    I redownloaded the file and uploaded it to 2 servers (The Pixelmon one mentioned above, and a pure bukkit 1.7.10) and I get the same error as earlier

    (From the Bukkit 1.7.10 server)
    26.01 00:15:53 [Server] ERROR Could not load 'plugins/Logger.jar' in folder 'plugins'
     
  8. Offline

    pie_flavor

    And then it gave a lot of lines with package names and line numbers. I need that.
     
  9. Online

    timtower Moderator Moderator

    Moved to Bukkit alternatives
     
    LemonGraham likes this.
  10. Offline

    LemonGraham

    Cauldron (open)
    Code:
    26.01 02:27:28 [Server] INFO ... 12 more 26.01 02:27:28 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:189) ~[PluginClassLoader.class:?] 26.01 02:27:28 [Server] INFO at java.lang.Class.forName(Unknown Source) ~[?:1.7.0_72] 26.01 02:27:28 [Server] INFO at java.lang.Class.forName0(Native Method) ~[?:1.7.0_72] 26.01 02:27:28 [Server] INFO Caused by: java.lang.ClassNotFoundException: plugin/LoggerMain 26.01 02:27:28 [Server] INFO at java.lang.Thread.run(Unknown Source) [?:1.7.0_72] 26.01 02:27:28 [Server] INFO at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:620) [MinecraftServer.class:?] 26.01 02:27:28 [Server] INFO at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:329) [lt.class:?] 26.01 02:27:28 [Server] INFO at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:356) [MinecraftServer.class:?] 26.01 02:27:28 [Server] INFO at net.minecraft.world.WorldServer.<init>(WorldServer.java:153) [mt.class:?] 26.01 02:27:28 [Server] INFO at net.minecraft.world.World.<init>(World.java:350) [ahb.class:?] 26.01 02:27:28 [Server] INFO at net.minecraft.world.storage.SaveHandler.func_75757_d(SaveHandler.java:136) [ayq.class:?] 26.01 02:27:28 [Server] INFO at net.minecraft.world.storage.SaveHandler.initBukkitData(SaveHandler.java:458) [ayq.class:?] 26.01 02:27:28 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:320) [CraftServer.class:?] 26.01 02:27:28 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:256) [SimplePluginManager.class:?] 26.01 02:27:28 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:334) ~[SimplePluginManager.class:?] 26.01 02:27:28 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:145) ~[JavaPluginLoader.class:?] 26.01 02:27:28 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:191) ~[PluginClassLoader.class:?] 26.01 02:27:28 [Server] INFO org.bukkit.plugin.InvalidPluginException: Cannot find main class `plugin.LoggerMain' 26.01 02:27:28 [Server] ERROR Could not load 'plugins/Logger.jar' in folder 'plugins'




    Bukkit (open)
    Code:
    26.01 02:10:08 [Server] INFO ... 10 more 26.01 02:10:08 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.&lt;init&gt;(PluginClassLoader.java:40) ~[custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO at java.lang.Class.forName(Unknown Source) ~[?:1.7.0_72] 26.01 02:10:08 [Server] INFO at java.lang.Class.forName0(Native Method) ~[?:1.7.0_72] 26.01 02:10:08 [Server] INFO at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_72] 26.01 02:10:08 [Server] INFO at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_72] 26.01 02:10:08 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) ~[custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:77) ~[custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.7.0_72] 26.01 02:10:08 [Server] INFO at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_72] 26.01 02:10:08 [Server] INFO at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_72] 26.01 02:10:08 [Server] INFO at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_72] 26.01 02:10:08 [Server] INFO Caused by: java.lang.ClassNotFoundException: plugin.LoggerMain 26.01 02:10:08 [Server] INFO at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:436) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.java:133) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO at net.minecraft.server.v1_7_R4.DedicatedPlayerList.&lt;init&gt;(SourceFile:14) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO at net.minecraft.server.v1_7_R4.PlayerList.&lt;init&gt;(PlayerList.java:68) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.CraftServer.&lt;init&gt;(CraftServer.java:326) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:364) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:328) ~[custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:127) ~[custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.&lt;init&gt;(PluginClassLoader.java:42) ~[custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks] 26.01 02:10:08 [Server] INFO org.bukkit.plugin.InvalidPluginException: Cannot find main class `plugin.LoggerMain' 26.01 02:10:08 [Server] ERROR Could not load 'plugins/Logger.jar' in folder 'plugins' 26.01 02:10:08 [Server] INFO This server is running CraftBukkit version git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks (MC: 1.7.10) (Implementing API version 1.7.10-R0.1-SNAPSHOT)


    Thank you for the continued help by the way ^_^

    EDIT by Timtower: added code tags
     
  11. Online

    timtower Moderator Moderator

    @LemonGraham You probably want to get those logs from the files and not from the console windows ( I assume that you are doing that, could be wrong )
     
    LemonGraham likes this.
  12. Offline

    LemonGraham

    Bukkit Server
    Code:
    21 [00:14:02] [Server thread/ERROR]: Could not load 'plugins/Logger.jar' in folder 'plugins'
    22 org.bukkit.plugin.InvalidPluginException: Cannot find main class `plugin.LoggerMain'
    23 at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:42) ~[craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    24 at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:127) ~[craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    25 at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:328) ~[craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    26 at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    27 at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugins(CraftServer.java:364) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    28 at org.bukkit.craftbukkit.v1_7_R3.CraftServer.<init>(CraftServer.java:326) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    29 at net.minecraft.server.v1_7_R3.PlayerList.<init>(PlayerList.java:68) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    30 at net.minecraft.server.v1_7_R3.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    31 at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:126) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    32 at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:436) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    33 at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    34 Caused by: java.lang.ClassNotFoundException: plugin.LoggerMain
    35 at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_72]
    36 at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_72]
    37 at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_72]
    38 at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.7.0_72]
    39 at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:77) ~[craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    40 at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) ~[craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    41 at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_72]
    42 at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_72]
    43 at java.lang.Class.forName0(Native Method) ~[?:1.7.0_72]
    44 at java.lang.Class.forName(Unknown Source) ~[?:1.7.0_72]
    45 at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:40) ~[craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    

    Cauldron
    Code:
        628    [16:30:00] [Server thread/ERROR]: Could not load 'plugins/Logger.jar' in folder 'plugins'
        629    org.bukkit.plugin.InvalidPluginException: Cannot find main class `plugin.LoggerMain'
        630    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:191) ~[PluginClassLoader.class:?]
        631    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:145) ~[JavaPluginLoader.class:?]
        632    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:334) ~[SimplePluginManager.class:?]
        633    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:256) [SimplePluginManager.class:?]
        634    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:320) [CraftServer.class:?]
        635    at net.minecraft.world.storage.SaveHandler.initBukkitData(SaveHandler.java:458) [ayq.class:?]
        636    at net.minecraft.world.storage.SaveHandler.func_75757_d(SaveHandler.java:136) [ayq.class:?]
        637    at net.minecraft.world.World.<init>(World.java:350) [ahb.class:?]
        638    at net.minecraft.world.WorldServer.<init>(WorldServer.java:153) [mt.class:?]
        639    at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:356) [MinecraftServer.class:?]
        640    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:329) [lt.class:?]
        641    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:620) [MinecraftServer.class:?]
        642    at java.lang.Thread.run(Unknown Source) [?:1.7.0_72]
        643    Caused by: java.lang.ClassNotFoundException: plugin/LoggerMain
        644    at java.lang.Class.forName0(Native Method) ~[?:1.7.0_72]
        645    at java.lang.Class.forName(Unknown Source) ~[?:1.7.0_72]
        646    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:189) ~[PluginClassLoader.class:?]
    Straight from the .log file now, copied from a log viewer.
     
  13. Offline

    pie_flavor

    @LemonGraham Complete noob mistake. I set the main class in plugin.yml to LoggerMain and then actually named the class Logger.
    Redownload for fix. I can't believe that happened.
     
  14. Offline

    LemonGraham

    Good new and bad news... It loaded! :D
    But I get an error when I try to do the command :/


    Code:
    [18:28:35] [Server thread/INFO]: LemonGraham issued server command: /log Test Test words here
    [18:28:35] [Server thread/ERROR]: null
    org.bukkit.command.CommandException: Unhandled exception executing command 'log' in plugin Logger v3.14159
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[PluginCommand.class:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) ~[SimpleCommandMap.class:?]
        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:717) ~[CraftServer.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:1348) [nh.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:1130) [nh.class:?]
        at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(C01PacketChatMessage.java:38) [ir.class:?]
        at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(C01PacketChatMessage.java:53) [ir.class:?]
        at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:244) [ej.class:?]
        at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:173) [nc.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:980) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:423) [lt.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:798) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:658) [MinecraftServer.class:?]
        at java.lang.Thread.run(Unknown Source) [?:1.7.0_72]
    Caused by: java.util.regex.PatternSyntaxException: Unmatched closing ')' near index 3
    ^[$])
       ^
        at java.util.regex.Pattern.error(Unknown Source) ~[?:1.7.0_72]
        at java.util.regex.Pattern.compile(Unknown Source) ~[?:1.7.0_72]
        at java.util.regex.Pattern.<init>(Unknown Source) ~[?:1.7.0_72]
        at java.util.regex.Pattern.compile(Unknown Source) ~[?:1.7.0_72]
        at java.util.regex.Pattern.matches(Unknown Source) ~[?:1.7.0_72]
        at java.lang.String.matches(Unknown Source) ~[?:1.7.0_72]
        at plugin.Logger.onCommand(Logger.java:21) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[PluginCommand.class:?]
        ... 13 more
    Is this simply user-error?



    EDIT- Other server's error message
    Code:
    [18:30:47] [Server thread/INFO]: LemonGraham issued server command: /log Notes Example note here
    [18:30:47] [Server thread/ERROR]: null
    org.bukkit.command.CommandException: Unhandled exception executing command 'log' in plugin Logger v3.14159
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) ~[custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:740) ~[custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:957) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:818) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat.java:47) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:157) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        at net.minecraft.server.v1_7_R4.ServerConnection.c(SourceFile:134) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:667) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:258) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:558) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:469) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    Caused by: java.util.regex.PatternSyntaxException: Unmatched closing ')' near index 3
    ^[$])
       ^
        at java.util.regex.Pattern.error(Unknown Source) ~[?:1.7.0_72]
        at java.util.regex.Pattern.compile(Unknown Source) ~[?:1.7.0_72]
        at java.util.regex.Pattern.<init>(Unknown Source) ~[?:1.7.0_72]
        at java.util.regex.Pattern.compile(Unknown Source) ~[?:1.7.0_72]
        at java.util.regex.Pattern.matches(Unknown Source) ~[?:1.7.0_72]
        at java.lang.String.matches(Unknown Source) ~[?:1.7.0_72]
        at plugin.Logger.onCommand(Logger.java:21) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[custom.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
        ... 13 more
     
  15. Offline

    pie_flavor

    @LemonGraham Redownload for fix. Nope, not user error. And by the way, you can type /log <$filename> <message> to log to a specific file. Do not type .txt, that is done for you.
     
  16. Offline

    LemonGraham

    It loaded, no warns on either server, enabled without warns, but won't run. It says in chat "For whatever reason, nope" twice, but nothing is printed to the console, log, or files. The jar didn't create any files or folders at all, either.
     
  17. Offline

    pie_flavor

    @LemonGraham Interesting. Interesting. It's not supposed to create them unelss you type the commands. Also, the only time it says For whatever reason, nope is when it hits an IOException. Redownload it. I don't expect a fix, but it'll say something in console this time.
     
  18. Offline

    LemonGraham

    In the straight bukkit server
    Code:
    [00:43:27] [Server thread/INFO]: LemonGraham issued server command: /log test test
    [00:43:27] [Server thread/WARN]: java.io.IOException: No such file or directory
    [00:43:27] [Server thread/WARN]:     at java.io.UnixFileSystem.createFileExclusively(Native Method)
    [00:43:27] [Server thread/WARN]:     at java.io.File.createNewFile(Unknown Source)
    [00:43:27] [Server thread/WARN]:     at plugin.Logger.onCommand(Logger.java:24)
    [00:43:27] [Server thread/WARN]:     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    [00:43:27] [Server thread/WARN]:     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180)
    [00:43:27] [Server thread/WARN]:     at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:740)
    [00:43:27] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:957)
    [00:43:27] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:818)
    [00:43:27] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28)
    [00:43:27] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat.java:47)
    [00:43:27] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:157)
    [00:43:27] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.ServerConnection.c(SourceFile:134)
    [00:43:27] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:667)
    [00:43:27] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:258)
    [00:43:27] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:558)
    [00:43:27] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:469)
    [00:43:27] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628)
    
    Also, it only says "For whatever reason, nope" once now, instead of twice
     
  19. Offline

    pie_flavor

    @LemonGraham Okay, got it. Redownload once more, everything should work fine.
    Also: the command you typed will put "test test" into log.txt
    Type /log $test test
     
  20. Offline

    LemonGraham

    It works slightly, however it will only save one line of text, and only to LoggerLog.txt

    I typed
    /log $test test 1
    /log $test test 2
    /log $test test 3
    /log $test test 4
    And the file only had
    [2015/01/27 02:13:52] $test test 4

    It all gets put in that folder, only one line, no matter how I try to do it
    Also a small note, it creates the file in the plugins folder itself, not a sub folder. Not that big of a deal, but one of my servers has over 50 plugins in it, so it gets hard to navigate :p
    Also, I don't really need this but I though I should bring it up, there is no in-game or in-console confirmation that the command worked at all, I'm probably only going to use command blocks for it anyway so I don't mind that
     
  21. Offline

    pie_flavor

    @LemonGraham I probably screwed up the regular expression for the filename. Also, the data folder was intended and in fact the reason for the previous error. Just changed both. Redownload pls
    Logger.jar
    So you don't have to keep finding the link
     
  22. Offline

    LemonGraham

    Now it doesn't log to either a folder or the loggerlog.txt. Also no errors in the console. Seems like a ghost command
     
  23. Offline

    pie_flavor

    I might've fixed it and I might've not. I truthfully don't know, I don't know what the original problem was. And I changed it so it works in the server folder instead of the data folder (probably).
     
  24. Offline

    LemonGraham

    It is saying "For whatever reason, nope" again. Running as OP on bukkit

    Code:
    [22:14:40] [Server thread/INFO]: LemonGraham issued server command: /log $test test 1
    [22:14:40] [Server thread/WARN]: java.io.IOException: Permission denied
    [22:14:40] [Server thread/WARN]:     at java.io.UnixFileSystem.createFileExclusively(Native Method)
    [22:14:40] [Server thread/WARN]:     at java.io.File.createNewFile(Unknown Source)
    [22:14:40] [Server thread/WARN]:     at plugin.Logger.onCommand(Logger.java:27)
    [22:14:40] [Server thread/WARN]:     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    [22:14:40] [Server thread/WARN]:     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180)
    [22:14:40] [Server thread/WARN]:     at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:740)
    [22:14:40] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:957)
    [22:14:40] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:818)
    [22:14:40] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28)
    [22:14:40] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat.java:47)
    [22:14:40] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:157)
    [22:14:40] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.ServerConnection.c(SourceFile:134)
    [22:14:40] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:667)
    [22:14:40] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:258)
    [22:14:40] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:558)
    [22:14:40] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:469)
    [22:14:40] [Server thread/WARN]:     at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628)
    I also tried /log test test 1, /log test.txt test 1, and /log $test.txt test 1, just to make sure. I also manually created a "Logger" folder in plugins, with test.txt inside it then tried all of those commands again, but no change in the file.
     
  25. Offline

    pie_flavor

    @LemonGraham Dunno, really. That's the line that says create the file. Maybe if you made the file beforehand?
     
  26. Offline

    LemonGraham

    I thought that, in my post I mentioned I made a Logger folder with test.txt inside it. Would the plugin create the folder /Plugins/Logger/file.txt, or would it go through a different file path?
     
  27. Offline

    pie_flavor

    Um, no. I changed it so it'd be in the server folder. Not sure if that's what was causing the problem.
     
  28. Offline

    LemonGraham

    I just found "nulllog.txt" inside the server folder (I see what you meant by that now)
    160 [03:13:33] [Server thread/INFO]: LemonGraham issued server command: /log $log log log log log log

    ^That was logged the command that logged it, and
    "[2015/01/27 03:13:33] $log log log log log log" is what was logged

    Also, I noticed 3 new files I've never seen before. .bash_logout, .bash_profile, and .bashrc. I don't know if this plugin made them, but I have no idea where they came from. It might be from the other Owner of the server, though
     
  29. Offline

    pie_flavor

    @LemonGraham probably. I didn't make them, that's for sure.
     
Thread Status:
Not open for further replies.

Share This Page