title: Write the log in to existing common log file using slf4j
body: <p>I have multiple services and each one of them interacting with each other. There is <code>common.log</code> file where I am writing the common log in to this file. logback.xml entry for this <code>common.log</code> is present in to another service lets name it as Service1. I want to write the some common things in to this existing <code>common.log</code> file using slf4j.</p>
  <p>I tried to write a utility class to write the log from Service2 application to <code>common.log</code> and using the <code>java.util.logging</code> package as below ,</p>
  <pre><code>public class LogUtil {
  
      private static LogUtil instance = new LogUtil();
  
      public static LogUtil getInstance() {
          return instance;
      }
  
      private static final Logger logger = Logger.getLogger(LogUtil.class.getName());
  
      static {
          try {
              String logFile = System.getProperty(&quot;home&quot;) + &quot;/logs/common.log&quot;;
              FileHandler fh = new FileHandler(logFile, true);
              SimpleFormatter formatter = new SimpleFormatter();
              fh.setFormatter(formatter);
              logger.addHandler(fh);
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  
      public void error(String msg) {
          logger.log(Level.SEVERE,&quot;[Error Common] :&quot;+msg);
      }
  }
  </code></pre>
  <p>I want to do it using the slf4j api. Please suggest me some approach to write the utility class using slf4j.</p>