namespace Wayne.Lib.Log
{
    /// <summary>
    /// A set of parameters to control how to log an LogEntry as a string line.
    /// </summary>
    public class LogTextWritingParameters
    {
        #region Construction

        internal LogTextWritingParameters(string dateTimeFormat, EntityLogKind entityLogKind, bool suppressCategory, bool keepFileOpened)
        {
            DateTimeFormat = dateTimeFormat;
            EntityLogKind = entityLogKind;
            SuppressCategory = suppressCategory;
            KeepFileOpened = keepFileOpened;
        }

        #endregion

        #region Properties

        /// <summary>
        /// The format of the DateTime.
        /// </summary>
        public string DateTimeFormat { get; private set; }

        /// <summary>
        /// The details of the identifiable entity.
        /// </summary>
        public EntityLogKind EntityLogKind { get; private set; }

        /// <summary>
        /// Should the category be suppressed or not.
        /// </summary>
        public bool SuppressCategory { get; private set; }

        /// <summary>
        /// Should the file be kept open or closed after each write.
        /// </summary>
        public bool KeepFileOpened { get; private set; }

        #endregion
    }
}