title: How do I implement logging in an enum singleton?
body: <p>I'm using an enum singleton, but implementing logging is troublesome. This:</p>
  
  <pre><code>public enum Foo {
    INSTANCE;
  
    private final Logger log = Logger.getLogger(Foo.class.getName());
  
    ...
  }
  </code></pre>
  
  <p>The logger is instantiated in the way that I would instantiate a logger for a normal Java class, but of course I get the following error:</p>
  
  <pre><code>Foo.java: illegal reference to static field from initializer 
  </code></pre>
  
  <p>Is there an equivalent way to log in enum singletons?</p>