Two Posted January 13, 2015 Share Posted January 13, 2015 I've been searching through the logging configuration for a while but can't seem to figure out how to get the trace/debug output of my mod to log on the console output (what you see when hitting 'run' in your IDE). I can see that the stuff is logged properly to the file, just not to my console. Any help would be appreciated. Quote My Mods New Dawn - A completely new terrain engine for Minecraft TwoTility - Blocks and Items for a better Minecraft TwoGraves - Keeps your items safe on death Link to comment Share on other sites More sharing options...
Draco18s Posted January 13, 2015 Share Posted January 13, 2015 System.out.println("Your message here") Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
Two Posted January 13, 2015 Author Share Posted January 13, 2015 The benefit of not doing that is that you can leave important debug output inside the code, but have it hidden in release mode until you need it. System.out will just pollute the output. Quote My Mods New Dawn - A completely new terrain engine for Minecraft TwoTility - Blocks and Items for a better Minecraft TwoGraves - Keeps your items safe on death Link to comment Share on other sites More sharing options...
Draco18s Posted January 13, 2015 Share Posted January 13, 2015 Soooo... are you looking for the FMLLogger? A compile directive? What? Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
pickaxe_engineer Posted January 13, 2015 Share Posted January 13, 2015 Hey guys Recently Bedrock_Miner asked a similar question: http://www.minecraftforge.net/forum/index.php?topic=26383.0 I found the location of the log4j config file too, but this is read-only in the forge.jar. I hope someone out there knows a solution. Sincerely -pick Quote Since English is not my mother tongue, my sentences may are confusing. I'm coding java for a long time now - just MC and forge stop me sometimes. Link to comment Share on other sites More sharing options...
coolAlias Posted January 14, 2015 Share Posted January 14, 2015 You can create your own Handler and Formatter for the Logger, allowing you to set what levels will be shown via logger.setLevel(Level.WHATEVER). That's with the java.util.logging.Logger, though. I'm not sure how to do it with the Apache one, but I imagine it is similar. If that's too much work for you, all logged messages (even TRACE and the like) are logged to a file on disk, such as 'eclipse/logs/fml-client-latest.txt', so you can use that for development debugging. Quote http://i.imgur.com/NdrFdld.png[/img] Link to comment Share on other sites More sharing options...
Two Posted January 14, 2015 Author Share Posted January 14, 2015 In theory - that's as far as I could figure out - there needs to be a log4j.xml file somewhere, in which some handler needs to be reconfigured in some way to output trace/debug log entries on the IDE console. Italic font parts are those I wasn't able to figure out yet. Quote My Mods New Dawn - A completely new terrain engine for Minecraft TwoTility - Blocks and Items for a better Minecraft TwoGraves - Keeps your items safe on death Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.