/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 * 
 * 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 Komodo code.
 * 
 * The Initial Developer of the Original Code is ActiveState Software Inc.
 * Portions created by ActiveState Software Inc are Copyright (C) 2000-2007
 * ActiveState Software Inc. All Rights Reserved.
 * 
 * Contributor(s):
 *   ActiveState Software Inc
 * 
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 * 
 * ***** END LICENSE BLOCK ***** */

#include "nsISupports.idl"

// Komodo Logging system service -- a subset of the logging.py API

[scriptable, uuid(E2E8C6CE-D0B9-49DE-A39D-496E9E5F32C4)]
interface koILogger: nsISupports {
    void setLevel(in long level);
    long getEffectiveLevel();
    attribute long level;
    boolean isEnabledFor(in long level);
    void debug(in wstring msg);
    void info(in wstring msg);
    void warn(in wstring msg);
    // void exception(in wstring msg); // not using since we can't do x-language exceptions
    void error(in wstring msg);
    void critical(in wstring msg);
};

[scriptable, uuid(E4810284-E021-4FE2-B031-25C721879D21)]
interface koILoggingService: nsISupports {
    koILogger getLogger(in wstring logger_name);
    void getLoggerNames(out unsigned long count,
                        [retval,
                        array,
                        size_is(count)] out wstring strs);
    const long DEBUG = 10;
    const long INFO = 20;
    const long WARN = 30;
    const long ERROR = 40;
    const long CRITICAL = 50;
};


[scriptable, uuid(8AC7F72A-2717-4264-B881-05FA6D3D7973)]
interface koILogRecord: nsISupports {
    attribute wstring logger;
    attribute wstring levelname;
    attribute wstring message;
};

