Sometimes it would be nice to ask users reporting bugs to supply a file of only logs relevant to your plugin rather than having them send the whole idea.log file. Is that a reasonable thing to do, record logs to a separate file for one plugin? If so, is there a way to do so?
Alternatively, perhaps this isn’t a good idea? Potentially it would be too easy to miss interactions between plugins, for example?
Great, thanks for clarifying. Can you point me to a code sample or help me understand in the below example?
So the state of my file:
import com.intellij.openapi.diagnostic.Logger;
public class MyClass {
public static final Logger LOG = Logger.getInstance(MyClass.class) // IJ logger - is this the recommended way to use within a class?
public MyClass() {
LOG.setHandler(new LogHandler()) // LogHandler will write to a separate file, but how should this be done when `setHandler` is only available in java.util.logging.Logger?
}
public void logSomething() {
LOG.info("Log something"); // I'd like this to go to a separate file
}
}