Posted September 3, 201510 yr So I've created a Logger class and as stated by the tutorial Pahimar did on this, you're supposed to use this line of code in your log function: FMLLog.log(ModConstants.MOD_NAME, logLevel, object); However, in reality, it seems that in 1.8 forge has changed this, and you now need a format string. I found this ( [font=Verdana][size=2px]"%s %s:\n%s"[/size][/font] ) somewhere, but I've no clue if that's correct or what to use if it's not. Thanks in advance! Who are you? Why have you brought me here? And why are there so many PewDiePie fanboys surrounding meeeeeeeee....... *falls into pit and dies*. Also this. Check it out. http://i.imgur.com/J4rrGt6.png[/img]
September 3, 201510 yr The FMLInitialization events should also register and pass off a logger to you. Or at least they do in 1.7.10 and I see no reason why that would have changed. 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.
September 3, 201510 yr Author Well, I need a Logger for more things than initialization events. I guess I could make a logger variable in the main class, but I don't know if that's the best practice. Who are you? Why have you brought me here? And why are there so many PewDiePie fanboys surrounding meeeeeeeee....... *falls into pit and dies*. Also this. Check it out. http://i.imgur.com/J4rrGt6.png[/img]
September 3, 201510 yr ...you can save it... 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.
September 3, 201510 yr Author Yeah, I could make an external variable in the actual mod class and set it in the preInitialization event, but I'm just not sure that's the best thing to do. Who are you? Why have you brought me here? And why are there so many PewDiePie fanboys surrounding meeeeeeeee....... *falls into pit and dies*. Also this. Check it out. http://i.imgur.com/J4rrGt6.png[/img]
September 3, 201510 yr You don't need to use FMLLog, you can just get a Logger straight from Log4j. public static final Logger logger = LogManager.getLogger(ModConstants.MOD_NAME); Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods
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.