using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.Kernel.LogTail.Handlers
{
///
/// Represents a single log message.
///
public class LogMessage
{
private string _name;
///
/// Gets the name of the message.
///
public string Name
{
get { return _name; }
}
///
/// The values.
///
private Dictionary _values = new Dictionary();
///
/// Gets a specific attribute.
///
/// The name of the atttribute.
///
public string this[string name]
{
get
{
string result;
_values.TryGetValue(name, out result);
return result;
}
}
///
/// Creates a new instance of the class.
///
///
public LogMessage(string name)
{
_name = name;
}
///
/// Adds an attribute.
///
///
///
public void AddAttribute(string name, string value)
{
_values.Add(name, value);
}
}
}