Page 1 of 1

My First Plugin!

Posted: 07 Sep 2011, 07:21
by Laserhog
As a few of you may know i have been working on my very first plugin and it is done!

ServerLogSaver

It's in beta right now so some testing would be required to fine tune it but check it out and tell me what you think!
~Laserhog~

Re: My First Plugin!

Posted: 08 Sep 2011, 05:47
by HeinzPeter
Cool idea. But good administrators have their own scripts to cycle the logfile.
I have seen your dev.bukkit page. Nice! I bet people will use it. :-D

I had an error on server startup.
(You should test things on a linux VM or so.)

Code: Select all

2011-09-08 05:43:15 [INFO] [ServerLogSaver] Version 0.1b Is Enabled!
2011-09-08 05:43:15 [SEVERE] java.io.FileNotFoundException: home/private/tools/minecraft/survival/test/server.log (No such file or directory)
2011-09-08 05:43:15 [SEVERE] 	at java.io.FileInputStream.open(Native Method)
2011-09-08 05:43:15 [SEVERE] 	at java.io.FileInputStream.<init>(FileInputStream.java:137)
2011-09-08 05:43:15 [SEVERE] 	at me.laserhog.ServerLogSaver.MonitorLog.CopyMyFile(MonitorLog.java:71)
2011-09-08 05:43:15 [SEVERE] 	at me.laserhog.ServerLogSaver.MonitorLog.mainCollection(MonitorLog.java:51)
2011-09-08 05:43:15 [SEVERE] 	at me.laserhog.ServerLogSaver.MonitorLog.run(MonitorLog.java:24)
2011-09-08 05:43:15 [SEVERE] 	at java.util.TimerThread.mainLoop(Timer.java:534)
2011-09-08 05:43:15 [SEVERE] 	at java.util.TimerThread.run(Timer.java:484)

Re: My First Plugin!

Posted: 08 Sep 2011, 06:05
by Laserhog
Well it looks like according to this you don't have a server.log file
:?:

This seems very odd as it works on other servers and i have tested it multiple times, although only on Windows.
You run on Linux?

Re: My First Plugin!

Posted: 08 Sep 2011, 08:02
by kyborek
As far as i know this server runs on linux

Re: My First Plugin!

Posted: 08 Sep 2011, 20:03
by HeinzPeter
I really would not have posted that error when i know that there is no server.log.
The test was running on linux. Many other people use to use linux as host.
HeinzPeter wrote:(You should test things on a linux VM or so.)
Guess there is a problem with / and \. Should be /home/private/[...]
java.io.FileNotFoundException: home/private/tools/minecraft/survival/test/server.log (No such file or directory)

Re: My First Plugin!

Posted: 08 Sep 2011, 21:07
by Laserhog
I have posted a new version that may possibly fix this.
Or maybe this simply doesn't run on Linux for the time being.
If i could find a Linux VM then i could make one solely for Linux servers.

Re: My First Plugin!

Posted: 08 Sep 2011, 21:51
by HeinzPeter
Looks good after the update.
Two suggestions:
- check for 0 byte content
- console notice (optional)

Compressing is much easier on linux.
The binary is already there, or easy to check the existence (/usr/bin/*zip*).
I really have no clue how to use a 'global' binary to compress stuff on windows.

Re: My First Plugin!

Posted: 09 Sep 2011, 04:58
by Laserhog
Thanks for the testing! Ill put your suggestions in my To-Do list which is growing very large lol.
I'll also try keep up the Linux support JUST for you xD