Ejemplo n.º 1
0
        protected override void post()
        {
            base.post();
            Logger root     = Logger.getRootLogger();
            var    fileName = Path.Combine(getProperty("application.support.path"),
                                           getProperty("application.name").ToLower().Replace(" ", "") + ".log");
            RollingFileAppender appender = new RollingFileAppender(new PatternLayout(@"%d [%t] %-5p %c - %m%n"),
                                                                   fileName, true);

            appender.setMaxFileSize("10MB");
            appender.setMaxBackupIndex(0);
            root.addAppender(appender);
            if (Debugger.IsAttached)
            {
                root.setLevel(Level.DEBUG);
            }
        }
Ejemplo n.º 2
0
        private static void ConfigureLogging()
        {
            // we do not save the log file in the roaming profile
            var fileName = Path.Combine(Preferences.instance().getProperty("application.support.path"), "cyberduck.log");

            Logger root = Logger.getRootLogger();

            root.removeAllAppenders();

            RollingFileAppender appender = new RollingFileAppender(new PatternLayout(@"%d [%t] %-5p %c - %m%n"),
                                                                   fileName, true);

            appender.setMaxFileSize("1MB");
            appender.setMaxBackupIndex(0);
            root.addAppender(appender);

            root.setLevel(Level.toLevel(Preferences.instance().getProperty("logging")));
        }
Ejemplo n.º 3
0
        protected override void configureLogging(String level)
        {
            base.configureLogging(level);

            Logger root     = Logger.getRootLogger();
            var    fileName = Path.Combine(LogDirectoryFinderFactory.get().find().getAbsolute(),
                                           getProperty("application.name").ToLower().Replace(" ", "") + ".log");
            RollingFileAppender appender = new RollingFileAppender(new PatternLayout(@"%d [%t] %-5p %c - %m%n"),
                                                                   fileName, true);

            appender.setEncoding("UTF-8");
            appender.setMaxFileSize(Level.DEBUG.ToString().Equals(level) ? "250MB" : "10MB");
            appender.setMaxBackupIndex(0);
            root.addAppender(appender);
            if (Debugger.IsAttached)
            {
                root.setLevel(Level.DEBUG);
            }
        }
Ejemplo n.º 4
0
        private static void ConfigureLogging()
        {
            // we do not save the log file in the roaming profile
            var fileName = Path.Combine(Preferences.instance().getProperty("application.support.path"), "cyberduck.log");

            Logger root = Logger.getRootLogger();
            root.removeAllAppenders();

            RollingFileAppender appender = new RollingFileAppender(new PatternLayout(@"%d [%t] %-5p %c - %m%n"),
                                                                   fileName, true);
            appender.setMaxFileSize("1MB");
            appender.setMaxBackupIndex(0);
            root.addAppender(appender);

            root.setLevel(Level.toLevel(Preferences.instance().getProperty("logging")));
        }