The appender ignores the massages until it is properly initialized, but the thing is that the logger itself generates logging statements during initialization(for example ipc debug logs.). FsLogAppender will work on the filesystem that is active in the configuration given to its init() method.
In particular, we should avoid having special methods that need to be invoked for initialization and closing.
Current design does need extra initialization and finalization because we are using log4j's configurable way of using appenders. It is good that we can configure logging either to use fs or local files, but then we need to let log4j construct the appender for us, so we should somehow pass the conf object to the appender, right? We can definitely use something like
then construct FslogAppender, and add it to the rootLogger however what if we extend the logging system so that it can be used to store the logs of
nodes. Then we should have custom code to set the appender rather that using conf/log4j.properties.
Long story short, I think current architecture is slightly ugly, but I'm OK with it.