/*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * (the "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
 * 
 * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
 * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
 * language governing rights and limitations under the License.
 * 
 * The Original Code is the Venice Web Communities System.
 * 
 * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
 * for Silverwrist Design Studios.  Portions created by Eric J. Bowersox are
 * Copyright (C) 2003 Eric J. Bowersox/Silverwrist Design Studios.  All Rights Reserved.
 * 
 * Contributor(s): 
 */
package com.silverwrist.dynamo.util;

import com.silverwrist.dynamo.iface.*;

public class NullLog implements DynamoLog
{
  /*--------------------------------------------------------------------------------
   * Static data members
   *--------------------------------------------------------------------------------
   */

  private static NullLog _self = null;

  /*--------------------------------------------------------------------------------
   * Constructor
   *--------------------------------------------------------------------------------
   */

  private NullLog()
  { // do nothing
  } // end constructor

  /*--------------------------------------------------------------------------------
   * Implementations from interface DynamoLog
   *--------------------------------------------------------------------------------
   */

  public void debug(Object message)
  { // no implementation
  } // end debug

  public void debug(Object message, Throwable t)
  { // no implementation
  } // end debug

  public void error(Object message)
  { // no implementation
  } // end error

  public void error(Object message, Throwable t)
  { // no implementation
  } // end error

  public void fatal(Object message)
  { // no implementation
  } // end fatal

  public void fatal(Object message, Throwable t)
  { // no implementation
  } // end fatal

  public void info(Object message)
  { // no implementation
  } // end info

  public void info(Object message, Throwable t)
  { // no implementation
  } // end info

  public void warn(Object message)
  { // no implementation
  } // end warn

  public void warn(Object message, Throwable t)
  { // no implementation
  } // end warn

  /*--------------------------------------------------------------------------------
   * External static operations
   *--------------------------------------------------------------------------------
   */

  public static synchronized DynamoLog get()
  {
    if (_self==null)
      _self = new NullLog();
    return _self;

  } // end get

} // end class NullLog
