<commit_before># file is managed by puppet
<% if scope.lookupvar('rsyslog::preserve_fqdn') -%>
$PreserveFQDN on
<% end -%>
<% if scope.lookupvar('rsyslog::local_host_name') and scope.lookupvar('rsyslog::local_host_name') != :undef -%>
$LocalHostName <%= scope.lookupvar('rsyslog::local_host_name') %>
<% end -%>
#################
#### MODULES ####
#################

<% scope.lookupvar('rsyslog::modules').each do |module_row| -%>
<%= module_row %>
<% end -%>

<% if scope.lookupvar('rsyslog::non_kernel_facility') -%>
# Enable non-kernel facility klog messages
$KLogPermitNonKernelFacility on

<% end -%>
###########################
#### GLOBAL DIRECTIVES ####
###########################
#
# Set max message size for sending and receiving
#
$MaxMessageSize <%= scope.lookupvar('rsyslog::max_message_size') %>

#
# Set rate limit for messages received.
# 
$SystemLogRateLimitInterval <%= scope.lookupvar('rsyslog::system_log_rate_limit_interval') %>
$SystemLogRateLimitBurst <%= scope.lookupvar('rsyslog::system_log_rateLimit_burst') %>

<% if scope.lookupvar('rsyslog::default_template')  and scope.lookupvar('rsyslog::default_template') != :undef -%>
#
# Use traditional timestamp format.
# To enable high precision timestamps, comment out the following line.
#
$ActionFileDefaultTemplate <%= scope.lookupvar('rsyslog::default_template') %>

<% end -%>
<% if scope.lookupvar('rsyslog::msg_reduction') -%>
# Filter duplicated messages
$RepeatedMsgReduction on

<% end -%>
#
# Set the default permissions for all log files.
#
$FileOwner <%= scope.lookupvar('rsyslog::log_user') %>
$FileGroup <%= scope.lookupvar('rsyslog::log_group') %>
$FileCreateMode <%= scope.lookupvar('rsyslog::perm_file') %>
$DirOwner <%= scope.lookupvar('rsyslog::log_user') %>
$DirGroup <%= scope.lookupvar('rsyslog::log_group') %>
$DirCreateMode <%= scope.lookupvar('rsyslog::perm_dir') %>
$PrivDropToUser <%= scope.lookupvar('rsyslog::run_user') %>
$PrivDropToGroup <%= scope.lookupvar('rsyslog::run_group') %>
$WorkDirectory <%= scope.lookupvar('rsyslog::spool_dir') %>
<% if scope.lookupvar('rsyslog::umask') -%>
$Umask <%= scope.lookupvar('rsyslog::umask') %>
<% end -%>

<% if scope.lookupvar('rsyslog::omit_local_logging') -%>
# Turn off message reception via local log socket;
# local messages are retrieved through imjournal now.
$OmitLocalLogging on
<% end -%>

# Settings for imjournal
<% if scope.lookupvar('rsyslog::im_journal_statefile') -%>
$IMJournalStateFile <%=scope.lookupvar('rsyslog::im_journal_statefile') %>
<% end %>
$ImjournalIgnorePreviousMessages <%=scope.lookupvar('rsyslog::im_journal_ignore_previous_messages') %>
$imjournalRatelimitInterval <%=scope.lookupvar('rsyslog::im_journal_ratelimit_interval') %>
$imjournalRatelimitBurst <%=scope.lookupvar('rsyslog::im_journal_ratelimit_burst') %>

#
# Include all config files in <%= scope.lookupvar('rsyslog::rsyslog_d') %>
#
$IncludeConfig <%= scope.lookupvar('rsyslog::rsyslog_d') -%>*.conf

#
# Emergencies are sent to everybody logged in.
#
<% if @rsyslog_version and @rsyslog_version.split('.')[0].to_i >= 7 -%>
*.emerg	:omusrmsg:*
<% else -%>
*.emerg	*
<% end -%><commit_msg>Wrap imjournal configs in if clause to avoid being created on systems that do not support imjournal<commit_after># file is managed by puppet
<% if scope.lookupvar('rsyslog::preserve_fqdn') -%>
$PreserveFQDN on
<% end -%>
<% if scope.lookupvar('rsyslog::local_host_name') and scope.lookupvar('rsyslog::local_host_name') != :undef -%>
$LocalHostName <%= scope.lookupvar('rsyslog::local_host_name') %>
<% end -%>
#################
#### MODULES ####
#################

<% scope.lookupvar('rsyslog::modules').each do |module_row| -%>
<%= module_row %>
<% end -%>

<% if scope.lookupvar('rsyslog::non_kernel_facility') -%>
# Enable non-kernel facility klog messages
$KLogPermitNonKernelFacility on

<% end -%>
###########################
#### GLOBAL DIRECTIVES ####
###########################
#
# Set max message size for sending and receiving
#
$MaxMessageSize <%= scope.lookupvar('rsyslog::max_message_size') %>

#
# Set rate limit for messages received.
# 
$SystemLogRateLimitInterval <%= scope.lookupvar('rsyslog::system_log_rate_limit_interval') %>
$SystemLogRateLimitBurst <%= scope.lookupvar('rsyslog::system_log_rateLimit_burst') %>

<% if scope.lookupvar('rsyslog::default_template')  and scope.lookupvar('rsyslog::default_template') != :undef -%>
#
# Use traditional timestamp format.
# To enable high precision timestamps, comment out the following line.
#
$ActionFileDefaultTemplate <%= scope.lookupvar('rsyslog::default_template') %>

<% end -%>
<% if scope.lookupvar('rsyslog::msg_reduction') -%>
# Filter duplicated messages
$RepeatedMsgReduction on

<% end -%>
#
# Set the default permissions for all log files.
#
$FileOwner <%= scope.lookupvar('rsyslog::log_user') %>
$FileGroup <%= scope.lookupvar('rsyslog::log_group') %>
$FileCreateMode <%= scope.lookupvar('rsyslog::perm_file') %>
$DirOwner <%= scope.lookupvar('rsyslog::log_user') %>
$DirGroup <%= scope.lookupvar('rsyslog::log_group') %>
$DirCreateMode <%= scope.lookupvar('rsyslog::perm_dir') %>
$PrivDropToUser <%= scope.lookupvar('rsyslog::run_user') %>
$PrivDropToGroup <%= scope.lookupvar('rsyslog::run_group') %>
$WorkDirectory <%= scope.lookupvar('rsyslog::spool_dir') %>
<% if scope.lookupvar('rsyslog::umask') -%>
$Umask <%= scope.lookupvar('rsyslog::umask') %>
<% end -%>

<% if scope.lookupvar('rsyslog::omit_local_logging') -%>
# Turn off message reception via local log socket;
# local messages are retrieved through imjournal now.
$OmitLocalLogging on
<% end -%>

# Settings for imjournal (If supported)
<% if scope.lookupvar('rsyslog::im_journal_statefile') -%>
$IMJournalStateFile <%=scope.lookupvar('rsyslog::im_journal_statefile') %>
<% end %>
<% if scope.lookupvar('rsyslog::im_journal_ignore_previous_messages') -%>
$ImjournalIgnorePreviousMessages <%=scope.lookupvar('rsyslog::im_journal_ignore_previous_messages') %>
<% end %>
<% if scope.lookupvar('rsyslog::im_journal_ratelimit_interval') -%>
$imjournalRatelimitInterval <%=scope.lookupvar('rsyslog::im_journal_ratelimit_interval') %>
<% end %>
<% if scope.lookupvar('rsyslog::im_journal_ratelimit_burst') -%>
$imjournalRatelimitBurst <%=scope.lookupvar('rsyslog::im_journal_ratelimit_burst') %>
<% end %>

#
# Include all config files in <%= scope.lookupvar('rsyslog::rsyslog_d') %>
#
$IncludeConfig <%= scope.lookupvar('rsyslog::rsyslog_d') -%>*.conf

#
# Emergencies are sent to everybody logged in.
#
<% if @rsyslog_version and @rsyslog_version.split('.')[0].to_i >= 7 -%>
*.emerg	:omusrmsg:*
<% else -%>
*.emerg	*
<% end -%>
{'fraction_non_alphanumeric': 0.2001817080557238, 'fraction_numerical': 0.0006056935190793458, 'mean_word_length': 7.318639798488665, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 97, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7190845', 'n_tokens_mistral': 2390, 'n_tokens_neox': 2189, 'n_words': 383}