Making a Log File for your Plugins

Discussion in 'Resources' started by gjossep, Jul 9, 2012.

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

    macguy8

    Garris0n I was pointing out more that some of the features he talked about in his post weren't around / weren't as refined as they are now when this was written, not that he was bumping an old post.
     
  2. Offline

    metalhedd

    The only thing that has changed about logging since then is the switch to log4j. Java's built in logging utilities haven't changed in MANY years, they're always available in a java application, and a much better choice that just writing lines to a file.
     
  3. Offline

    macguy8

    metalhedd However, this is a per-plugin log while, which wasn't possible then and still isn't possible now. Although it's not the best implementation, it is something that Bukkit logging is lacking, therefor it's perfectly justified to make a Resource for.
     
  4. Offline

    metalhedd

    A per plugin log is still ridiculously easy to create using java.util.logging.Logger. You just create a new logger and attach a FileHandler. There's no reason to rely on bukkit for it. nor is there any reason to manually open and write lines to a file, it's inefficient. it lacks every feature of an actual logging system (like being able to disable it). and it's completely redundant because better facilities already exist in java.
     
  5. Offline

    macguy8

    metalhedd
    If it's so easy then why don't I see you making a tutorial to supersede this one vs coming here and saying it's a bad option.
     
    DevRosemberg likes this.
  6. Offline

    metalhedd

    Because there's no need for a 'bukkit tutorial' on how to use a built in java utility.
     
  7. Offline

    macguy8

    metalhedd So there's need for a bukkit tutorial for how to do basic other operations in Java, such as Ternary statements which help many other people but there's no need for how to use Logging? I see more plugins make that mistake than any other, and, obviously as you have 20 plugins, you should be very familiar with the mistakes people make when programming plugins. Also, please tahg me next time. Thanks. :)
     
  8. Offline

    metalhedd


    macguy8 Absolutely not. There's no need for tutorials on any of those topics in the bukkit forums. if someone needs to learn it they can go learn it from a java site. this site is for topics related to the bukkit api, end of story.
     
  9. Offline

    macguy8

    metalhedd there's a great need for them, and they're in fact some of the most popular tutorials of the site. And as well, this is the Bukkit site, not the bukkit API site.
     
  10. Offline

    metalhedd


    macguy8 LOL, Bukkit *IS* an API. and no, there is no need, just because they're popular doesn't make them necessary.. the information is available elsewhere, and usually much better written
     
    Garris0n likes this.
  11. Offline

    DevRosemberg

    metalhedd You enjoy trying to make people wrong and failing? Seriously dude LEARN to accept things as they are. You are by far not the best Developer in bukkit and i have seen lots of bugs in code you wrote and suggestions which were wrong but no one replied maybe because you were trying to help not just fucking with people (sorry for the word). As you may have seen people even enjoy this tutorials after you try to fuck them up (again sorry for the word) and fail. Im sick of this dude. For the good of everyone just stop doing it.
     
  12. Offline

    metalhedd


    DevRosemberg I enjoy finding and fixing mistakes if that's what you mean. I also have a strong distaste for misinformation. I'm not sure if you're trying to say I fail at making people wrong, or that I enjoy making people wrong, and making them fail. could you clarify? Also if it's the former, evidence of my failure would be appreciated. ;)
     
  13. Offline

    macguy8

    metalhedd Bukkit may be an API, but the site isn't for the API. The site is for discussing CRAFTBukkit, which isn't an API. Bukkit is the site for the (Craft)Bukkit project, and not a site for only the API. And if they're popular they're not at all necessary, but what's the purpose of ANY of the tutorials? To teach someone how to do something they don't know how to, and the general Java ones do that perfectly fine. It's the Resources section, not the Bukkit Resources section. If it helps people, it's a resource, and therefor deserves to stay.
     
  14. Offline

    DevRosemberg

    metalhedd Dont share that distate for misinformation because well maybe people want to fix it but not how you do it. And "Also if it's the former, evidence of my failure would be appreciated. ;)" just check out the thread i posted. There are more people saying it is a good tutorial etc than you trying to say the opposite.
     
  15. Offline

    metalhedd

    DevRosemberg IAccidentally made an excellent point in that very thread about how the number of people who use/like something has absolutely no correlation to it's quality. Especially in a community with such a large number inexperienced developers like bukkit. I would venture to guess that less than 1% of this community has enough experience to accurately gauge the quality of a tutorial.

    DevRosemberg I just read your edit to your previous post, just wanted to point out that I have never claimed to be the best developer here, I am far from it. Java is a fairly new language for me. I ask for help all the time. I have had bugs in most of my plugins, like most developers. I've never claimed otherwise.

    I only post here to help people, if you didn't learn anything at all from my posts in your other thread, that's really unfortunate. Instead of taking it personally maybe you should learn to treat it as an opportunity to improve yourself. I would absolutely love to have been corrected in all those spots that you say you've seen me post incorrect answers. I pride myself on researching things before I post, so I would like to go back and correct them.

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

    Tirelessly

    metalhedd DevRosemberg macguy8

    This is a place for any resource that might help a developer, new or experienced. Just because there are better places to find out about Java, doesn't mean that people shouldn't be allowed to try and help the community. However, metalhedd makes a pretty good point. As you get more experience, you realize how much bad information is readily available here. There's nothing wrong with dissenting from the majority and saying that a particular post should not be followed; in fact, there needs to be more of that here. Metalhedd is absolutely right in his assessment of this post in saying that it's inefficient and lacks a lot of essential pieces of logging.
     
    metalhedd likes this.
  17. Offline

    Garris0n

    No, not 1% of the "community". Much larger than that. 1% of the people who've come on this site, but out of the developer community that posts regularly? Probably at least 50%.
     
  18. Offline

    metalhedd

    This is actually news to me. I had always assumed that since this is a sub-forum of 'Plugin Development' which has a fairly strict "Bukkit-API Only" policy, that the same policy would apply to it's sub-forums. I've search for a post outlining any guidelines for this forum but haven't come up with anything, so I'll have to take your word for it, but it seems suspicious to me.
     
  19. Offline

    Tirelessly

    metalhedd I've never seen a topic locked for being able Java and not Bukkit, and there are tons in all of the Plugin Development subforums. Obviously something like JavaFX wouldn't make too much sense here, but basic Java can be utilized in almost any way to be worked into a plugin. Therefore, locking a Java post for not being about Bukkit is silly and not done (that I've ever seen).
     
  20. Offline

    metalhedd


    I think that's a matter of opinion, and we'll just have to agree to disagree there ;)


    I'm sure you're right, I mostly stick to the main Plugin Development forum, where things are a bit different.
     
  21. Offline

    RW_Craft

    gjossep I'm a noob at Java, how would I start a new line in the file? (I prefer Python, my school teach it anyway)
     
  22. Offline

    Skionz

    This will create a new line

    Code:
    pw.println();
    The println() method also takes objects as a parameter which will write them to the file on a new line. The print() method will write the object to the file but on the same line.
     
  23. Offline

    RW_Craft

    Skionz I decided to use the buffered writer, but thanks ayway
     
    Skionz likes this.
Thread Status:
Not open for further replies.

Share This Page