コード例 #1
0
ファイル: Log.cs プロジェクト: nguoiyoujie/Primrose
        /// <summary>Associates a log channel with a TextWriter. If the channel does not yet exist, create it</summary>
        /// <param name="channel">The name used to identify the logging channel</param>
        /// <param name="writer">The TextWriter to associate with the log channel</param>
        public static void Define(string channel, TextWriter writer)
        {
            LogChannel ch = GetOrCreateDefault(channel);

            ch.SetWriter(writer);
        }
コード例 #2
0
ファイル: Log.cs プロジェクト: nguoiyoujie/Primrose
        /// <summary>Associates a log channel with a log file. If the channel does not yet exist, create it</summary>
        /// <param name="channel">The name used to identify the logging channel</param>
        /// <param name="path">The path of the log file</param>
        public static void Define(string channel, string path)
        {
            LogChannel ch = GetOrCreateDefault(channel);

            ch.SetWriter(Path.Combine(DirectoryPath, path));
        }