battleguard Posted January 19, 2018 Share Posted January 19, 2018 I have a problem where I am making a folder hierarchy that has a folder for each run and a folder for each account being ran. This works great for saving off everything, but I cannot seem to find a way to change where the script logging output goes at runtime. Currently I log the script output using intellij's save console to output file feature, but I need to change the folder path at runtime so this wont work. - Things I have tried or thought about - redirecting output of jar using > out.txt in command line arguments but once again this is not runtime - redirecting system output using System.setOut(printstream), but once again the super locked down jar does not support this feature sadly - I can change all my calls in the entire script from the bots logger to a custom logger that I have implemented that saves the output to a fiile So far this is all I have thought of and I really do not like the idea of using the final option. Quote Link to comment Share on other sites More sharing options...
jca Posted January 21, 2018 Share Posted January 21, 2018 On 19/01/2018 at 7:08 PM, battleguard said: I have a problem where I am making a folder hierarchy that has a folder for each run and a folder for each account being ran. This works great for saving off everything, but I cannot seem to find a way to change where the script logging output goes at runtime. Currently I log the script output using intellij's save console to output file feature, but I need to change the folder path at runtime so this wont work. - Things I have tried or thought about - redirecting output of jar using > out.txt in command line arguments but once again this is not runtime - redirecting system output using System.setOut(printstream), but once again the super locked down jar does not support this feature sadly - I can change all my calls in the entire script from the bots logger to a custom logger that I have implemented that saves the output to a fiile So far this is all I have thought of and I really do not like the idea of using the final option. I tried this before... the only viable solution I came up was to create a custom logger. I'm sure there's some way to override the log() method though. Quote Link to comment Share on other sites More sharing options...