java - There is any way to change the Logger name path -


I am using the Java logger class and want to know if you want to output the name of the files as a generated class can change.

Fixed logger logger = new log ("C: \\ trace"); Fixed FileHandler FH; Public log (string path) throws security Exception, IOException {logger.setUseParentHandlers (false); FH = new fileholder (path + ".log", 1024 * 1024 * 5, 5, true); 5 Logger's Logger. Edhandler (FH); }

The output log is like this (Trace.log.0) and I need Traza.0.log or something like that.

Thanks all.

Specify generation numbers in your file pattern From the document:

If no "% g" field is specified and the file count is greater than one, the generation number will be added at the end of the generated file name, after which the dot


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -