Exemple #1
0
        private static void InitLogger()
        {
            var formatter = new LineFormatter();
            var logConfig = new LogConfig(formatter);

            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, new PlainStreamSocketTarget("logs6.papertrailapp.com", 26613, new SyslogFormatter("GrigoryP_Console", "Slotomania" + DateTime.Now.ToString("u"))));
            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, new SyncFileTarget(Path.Combine(ApplicationData.Current.LocalFolder.Path, @"Log.log")));

            LogManager.Init(logConfig);
        }
Exemple #2
0
        private void InitLogging()
        {
            var formatter    = new LineFormatter();
            var logConfig    = new LogConfig(formatter);
            var target       = new SyncFileTarget(Path.Combine(global::Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, "Log.log"));
            var logcatTarget = new LogcatTarget("XLogNS.Sapmles.Forms.Android");

            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, logcatTarget);
            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, target);
            LogManager.Init(logConfig);
        }
Exemple #3
0
 private void InitLogging()
 {
     var formatter = new LineFormatter();
     var logConfig = new LogConfig(formatter);
     var target = new SyncFileTarget(Path.Combine(global::Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, "Log.log"));
     logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, target);
     LogManager.Init(logConfig);
 }
Exemple #4
0
        private static void InitLogger()
        {
            var formatter = new LineFormatter();
            var logConfig = new LogConfig(formatter);

            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, new SyncFileTarget(@"D:\Log.log"));

            LogManager.Init(logConfig);
        }
Exemple #5
0
    public static void InitLogger()
    {
        var formatter = new LineFormatter();
        var logConfig = new LogConfig(formatter);

        logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, new AsyncFileTarget(formatter, "Log.log"));
        LogManager.Init(logConfig);
        Logger = LogManager.Default.GetLogger("BLogger");
    }
Exemple #6
0
        private static void InitLogger()
        {
            var formatter = new LineFormatter();
            var logConfig = new LogConfig(formatter);

            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, new SyncFileTarget(Path.Combine(ApplicationData.Current.LocalFolder.Path, @"Log.log")));

            LogManager.Init(logConfig);
        }
Exemple #7
0
        private static void InitLogger()
        {
            var formatter = new LineFormatter();
            var logConfig = new LogConfig(formatter);

            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, new SyncFileTarget(@"D:\Log.log"));

            LogManager.Init(logConfig);
        }
Exemple #8
0
        private static void InitLogger()
        {
            var formatter = new LineFormatter();
            var logConfig = new LogConfig(formatter);

            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, new InMemoryBufferTarget(65536));

            LogManager.Init(logConfig);
        }
Exemple #9
0
        private static void InitLogger()
        {
            var formatter = new LineFormatter();
            var logConfig = new LogConfig(formatter);

            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, new SyncFileTarget(Path.Combine(ApplicationData.Current.LocalFolder.Path, @"Log.log")));

            LogManager.Init(logConfig);
        }
Exemple #10
0
        private static void InitLogger()
        {
            var categoryRegistry = new LogCategoryRegistrar();
            var formatter        = new LineFormatter(new DefaultCategoryFormatter(categoryRegistry));
            var logConfig        = new LogConfig(formatter, categoryRegistry);

            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, new ConsoleTarget());

            LogManager.Init(logConfig);
        }
Exemple #11
0
        private static void InitLogger()
        {
            var categoryRegistry = new LogCategoryRegistrar();
            var formatter = new LineFormatter(new DefaultCategoryFormatter(categoryRegistry));
            var logConfig = new LogConfig(formatter, categoryRegistry);

            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, new ConsoleTarget());

            LogManager.Init(logConfig);
        }
Exemple #12
0
        private static void InitLogger()
        {
            var categoryRegistry = new LogCategoryRegistrar();
            var formatter        = new LineFormatter(new DefaultCategoryFormatter(categoryRegistry));
            var logConfig        = new LogConfig(formatter, categoryRegistry);

            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, new PlainTcpSocketTarget("logs6.papertrailapp.com", 26613, new SyslogFormatter("GrigoryP_Console", "Slotomania" + DateTime.Now.ToString("u"))));

            LogManager.Init(logConfig);
        }
        public Loger()
        {
            var formatter = new LineFormatter();
            var logConfig = new LogConfig(formatter);

            var target = new SyncFileTarget(System.IO.Path.Combine(ApplicationData.Current.LocalFolder.Path, @"FileManagerLogs.log"));

            logConfig.AddTarget(LogLevel.Trace, LogLevel.Fatal, target);
            LogManager.Init(logConfig);
            _logger = LogManager.Default.GetLogger("FileManager logs");
        }