/*
 * BEGIN FLOCK GPL
 *
 * Copyright Flock Inc. 2005-2009
 * 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(29cb8824-7fa7-4926-9931-f1be82816722)]
interface flockILoggingService : nsISupports {

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

  void log(in PRInt32 aLevel,
           in PRInt32 aOverrideLevel,
           in AString aContext,
           in AString aMessage);

  PRInt32 setLevel(in PRInt32 aLevel);

  void addObserver(in flockILoggingObserver aObserver);
  void removeObserver(in flockILoggingObserver aObserver);
};

%{C++

// e8c889a6-f832-4b09-a216-66a7e6178896
#define FLOCK_LOGGINGSERVICE_CID \
{ 0xe8c889a6, 0xf832, 0x4b09, { 0xa2, 0x16, 0x66, 0xa7, 0xe6, 0x17, 0x88, 0x96 } }
#define FLOCK_LOGGINGSERVICE_CLASSNAME "Flock Logging Service"
#define FLOCK_LOGGINGSERVICE_CONTRACTID "@flock.com/logging-service;1"

%}
