/*
 * BEGIN FLOCK GPL
 *
 * Copyright Flock Inc. 2005-2008
 * http://flock.com
 *
 * This file may be used under the terms of the
 * GNU General Public License Version 2 or later (the "GPL"),
 * http://www.gnu.org/licenses/gpl.html
 *
 * 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.
 *
 * END FLOCK GPL
 */

#include "nsISupports.idl"
#include "flockILoggingObserver.idl"

[scriptable, uuid(0614BD47-CA26-46AE-9EE4-E7452E9C6EAD)]
interface flockILoggingService: nsISupports {

  // logging level constants
  const PRUint16 LEVEL_ALL = 0x00;
  const PRUint16 LEVEL_DEBUG = 0x01;
  const PRUint16 LEVEL_INFO = 0x02;
  const PRUint16 LEVEL_WARN = 0x03;
  const PRUint16 LEVEL_ERROR = 0x04;
  const PRUint16 LEVEL_FATAL = 0x05;
  const PRUint16 LEVEL_OFF = 0x06;

  void log(in PRUint16 aLevel,
           in PRInt16 aOverrideLevel,
           in AString aContext,
           in AString aMessage);
  void setLevel(in unsigned short aLevel);
  void addObserver(in flockILoggingObserver observer);
  void removeObserver(in flockILoggingObserver observer);
};
