How to write loggers for its own log file