예제 #1
0
 public FormatOutputMessage(TraceLogger outer, LogLevel level, object message, Exception ex)
 {
     this.outer = outer;
     this.level = level;
     this.message = message;
     this.ex = ex;
 }
예제 #2
0
        static void Main(string[] args)
        {
            var logger = new TraceLogger(true, "ScriptBot logging", LogLevel.All, true, true, true, @"yyyy-MM-dd hh:mm:ss");

            ITransport transport = new Skype.SkypeTransport("@bot", logger);
            HostFactory.Run(configurator => configurator.Service<Bot>(b =>
                {
                    b.ConstructUsing(t => new Bot(transport, logger));
                    b.WhenStarted(t=> t.Initialize(typeof(Plugins.ScriptCs.ScriptBotScriptCsCommand)));
                    b.WhenStopped(t => t.Dispose());
                }));
            if (Debugger.IsAttached)
                Console.ReadLine();
        }
 /// <summary>
 /// Creates a new <see cref="TraceLogger"/> instance.
 /// </summary>
 protected override ILog CreateLogger(string name, LogLevel level, bool showLevel, bool showDateTime, bool showLogName, string dateTimeFormat)
 {
     ILog log = new TraceLogger(_useTraceSource, name, level, showLevel, showDateTime, showLogName, dateTimeFormat);
     return log;
 }
예제 #4
0
        /// <summary>
        /// Creates a new <see cref="TraceLogger"/> instance.
        /// </summary>
        protected override ILog CreateLogger(string name, LogLevel level, bool showLevel, bool showDateTime, bool showLogName, string dateTimeFormat)
        {
            ILog log = new TraceLogger(_useTraceSource, name, level, showLevel, showDateTime, showLogName, dateTimeFormat);

            return(log);
        }