//
// Copyright (c) 2004-2006 Jaroslaw Kowalski <jaak@jkowalski.net>
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * Neither the name of Jaroslaw Kowalski nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
//
using System;
using System.Runtime.InteropServices;
namespace NLog.ComInterop
{
/// <summary>
/// NLog COM Interop logger interface
/// </summary>
[Guid("757fd55a-cc93-4b53-a7a0-18e85620704a")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface ILogger
{
/// <summary>
/// Writes the diagnostic message at the specified level.
/// </summary>
/// <param name="level">The log level.</param>
/// <param name="message">A <see langword="string" /> to be written.</param>
void Log(string level, string message);
/// <summary>
/// Writes the diagnostic message at the Trace level.
/// </summary>
/// <param name="message">A <see langword="string" /> to be written.</param>
void Trace(string message);
/// <summary>
/// Writes the diagnostic message at the Debug level.
/// </summary>
/// <param name="message">A <see langword="string" /> to be written.</param>
void Debug(string message);
/// <summary>
/// Writes the diagnostic message at the Info level.
/// </summary>
/// <param name="message">A <see langword="string" /> to be written.</param>
void Info(string message);
/// <summary>
/// Writes the diagnostic message at the Warn level.
/// </summary>
/// <param name="message">A <see langword="string" /> to be written.</param>
void Warn(string message);
/// <summary>
/// Writes the diagnostic message at the Error level.
/// </summary>
/// <param name="message">A <see langword="string" /> to be written.</param>
void Error(string message);
/// <summary>
/// Writes the diagnostic message at the Fatal level.
/// </summary>
/// <param name="message">A <see langword="string" /> to be written.</param>
void Fatal(string message);
/// <summary>
/// Checks if the specified log level is enabled.
/// </summary>
/// <param name="level">The log level.</param>
/// <returns>A value indicating whether the specified log level is enabled.</returns>
bool IsEnabled(string level);
/// <summary>
/// Returns the boolean value indicating whether the Trace level is enabled.
/// </summary>
bool IsTraceEnabled
{
get;
}
/// <summary>
/// Returns the boolean value indicating whether the Debug level is enabled.
/// </summary>
bool IsDebugEnabled
{
get;
}
/// <summary>
/// Returns the boolean value indicating whether the Info level is enabled.
/// </summary>
bool IsInfoEnabled
{
get;
}
/// <summary>
/// Returns the boolean value indicating whether the Warn level is enabled.
/// </summary>
bool IsWarnEnabled
{
get;
}
/// <summary>
/// Returns the boolean value indicating whether the Error level is enabled.
/// </summary>
bool IsErrorEnabled
{
get;
}
/// <summary>
/// Returns the boolean value indicating whether the Fatal level is enabled.
/// </summary>
bool IsFatalEnabled
{
get;
}
/// <summary>
/// The logger name.
/// </summary>
string LoggerName
{
get; set;
}
}
}