예제 #1
0
        protected log_settings_string_readonly(string sett)
        {
            settings_ = new settings_as_string(sett);

            // general
            guid_          = new single_setting <string>(settings_, "guid", "");
            name_          = new single_setting <string>(settings_, "name", "");
            syntax_        = new single_setting <string>(settings_, "syntax", file_text_reader.UNKNOWN_SYNTAX);
            context_       = new single_setting <string>(settings_, "context", "");
            friendly_name_ = new single_setting <string>(settings_, "friendly_name", "");
            type_          = new single_setting_enum <log_type>(settings_, "type", log_type.file);
            file_type_     = new single_setting_enum <file_log_type>(settings_, "file_type", file_log_type.best_guess);
            reverse_       = new single_setting_bool(settings_, "reverse");

            available_columns_            = new single_setting <string>(settings_, "available_columns", "");
            is_open_first_time_           = new single_setting_bool(settings_, "is_open_first_time", true);
            column_positions_             = new dictionary_setting <string>(settings_, "column_positions", "");
            apply_column_positions_to_me_ = new dictionary_setting <bool>(settings_, "apply_column_positions_to_me");

            column_formatting_             = new dictionary_setting <string>(settings_, "column_format", "");
            apply_column_formatting_to_me_ = new dictionary_setting <bool>(settings_, "apply_column_format_to_me");

            category_format_ = new single_setting <string>(settings_, "category_format", "");

            description_template_ = new single_setting <string>(settings_, "description_template", "");
            aliases_ = new single_setting <string>(settings_, "aliases", "");

            line_if_line_does_not_match_syntax_ = new single_setting_bool(settings_, "line.if_line_does_not_match_syntax");
            line_if_line_starts_with_tab_       = new single_setting_bool(settings_, "line.if_line_starts_with_tab", true);

            part_separator_ = new single_setting <string>(settings_, "part.separator", ":");

            cvs_has_header_     = new single_setting_bool(settings_, "csv.has_header", true);
            cvs_separator_char_ = new single_setting <string>(settings_, "csv.separator_char", ",");

            event_remote_machine_name_ = new single_setting <string>(settings_, "event.remote_machine_name", "");
            event_remote_domain_       = new single_setting <string>(settings_, "event.remote_domain", "");
            event_remote_user_name_    = new single_setting <string>(settings_, "event.remote_user_name", "");
            event_remote_password_     = new single_setting <string>(settings_, "event.remote_password", "");
            event_log_type_            = new single_setting <string>(settings_, "event.log_type", "Application|System");
            event_provider_name_       = new single_setting <string>(settings_, "event.provider_name", "");

            debug_global_       = new single_setting_bool(settings_, "debug.global");
            debug_process_name_ = new single_setting <string>(settings_, "debug.process_name", "");

            xml_delimiter_ = new single_setting <string>(settings_, "xml.delimiter", "");

            db_provider_ = new single_setting <string>(settings_, "db_provider", "System.Data.SQLite");
            // http://stackoverflow.com/questions/11414399/sqlite-throwing-a-string-not-recognized-as-a-valid-datetime
            db_connection_string_ = new single_setting <string>(settings_, "db_connection_string", "Data Source=<your_db_file>;Version=3;new=False;datetimeformat=CurrentCulture");
            db_table_name_        = new single_setting <string>(settings_, "db_table_name", "logtable");
            db_fields_            = new single_setting <string>(settings_, "db_fields", "time_stamp\r\nlevel\r\nlogger\r\nmessage")
            {
                can_be_multi_line = true
            };
            db_id_field_ = new single_setting <string>(settings_, "db_id_field", "");

            // = new single_setting<string>(settings_, "", "");
        }
        protected log_settings_string_readonly(string sett)
        {
            settings_ = new settings_as_string(sett);

            // general
            guid_          = new single_setting <string>(settings_, "guid", "");
            name_          = new single_setting <string>(settings_, "name", "");
            syntax_        = new single_setting <string>(settings_, "syntax", file_text_reader.UNKNOWN_SYNTAX);
            context_       = new single_setting <string>(settings_, "context", "");
            friendly_name_ = new single_setting <string>(settings_, "friendly_name", "");
            type_          = new single_setting_enum <log_type>(settings_, "type", log_type.file);
            file_type_     = new single_setting_enum <file_log_type>(settings_, "file_type", file_log_type.best_guess);
            reverse_       = new single_setting_bool(settings_, "reverse");

            available_columns_            = new single_setting <string>(settings_, "available_columns", "");
            is_open_first_time_           = new single_setting_bool(settings_, "is_open_first_time", true);
            column_positions_             = new dictionary_setting <string>(settings_, "column_positions", "");
            apply_column_positions_to_me_ = new dictionary_setting <bool>(settings_, "apply_column_positions_to_me");

            column_formatting_             = new dictionary_setting <string>(settings_, "column_format", "");
            apply_column_formatting_to_me_ = new dictionary_setting <bool>(settings_, "apply_column_format_to_me");

            category_format_ = new single_setting <string>(settings_, "category_format", "");

            description_template_ = new single_setting <string>(settings_, "description_template", "");
            aliases_ = new single_setting <string>(settings_, "aliases", "");

            line_if_line_ = new single_setting_bool(settings_, "line.if_line");

            part_separator_ = new single_setting <string>(settings_, "part.separator", ":");

            cvs_has_header_     = new single_setting_bool(settings_, "csv.has_header", true);
            cvs_separator_char_ = new single_setting <string>(settings_, "csv.separator_char", ",");

            event_remote_machine_name_ = new single_setting <string>(settings_, "event.remote_machine_name", "");
            event_remote_domain_       = new single_setting <string>(settings_, "event.remote_domain", "");
            event_remote_user_name_    = new single_setting <string>(settings_, "event.remote_user_name", "");
            event_remote_password_     = new single_setting <string>(settings_, "event.remote_password", "");
            event_log_type_            = new single_setting <string>(settings_, "event.log_type", "Application|System");
            event_provider_name_       = new single_setting <string>(settings_, "event.provider_name", "");

            debug_global_       = new single_setting_bool(settings_, "debug.global");
            debug_process_name_ = new single_setting <string>(settings_, "debug.process_name", "");

            xml_delimiter_ = new single_setting <string>(settings_, "xml.delimiter", "");
            // = new single_setting<string>(settings_, "", "");
        }