I am using log4j for logging. I have a requirement where the log files should be created in the path entered by the user in command prompt. Is it possible to change the log file path dynamically. I also have to create a separate log file with current time stamp in file name.Is this possible.
Share
To setup the Filepath depending on the users input:
to your second Question:
The filename should be updated every time you log an event? This sounds like a bad performance. Better use a
DailyRollingFileAppenderto get a new logfile one a timestep of your choice and put the timestamp of the last event in the filename(default).