You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/11/20 18:30:30 UTC

[GitHub] alficles commented on a change in pull request #2922: Update logging.config generation to allow additional types and logging filters

alficles commented on a change in pull request #2922: Update logging.config generation to allow additional types and logging filters
URL: https://github.com/apache/trafficcontrol/pull/2922#discussion_r235106088
 
 

 ##########
 File path: traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
 ##########
 @@ -1451,24 +1449,51 @@ sub logging_dot_config {
 			$text .= "	Format = '" . $format . " '\n";
 			$text .= "}\n";
 		}
+	}
+
+	for ( my $i = 0; $i < $max_log_objects; $i = $i + 1) {
+		my $log_filter_field = "LogFilter";
+		if ( $i > 0 ) {
+			$log_filter_field = $log_filter_field . "$i";
+		}
+		my $log_filter_name = $data->{$log_filter_field . ".Name"} || "";
+		if ( length($log_filter_name) > 0) {
+			my $filter = $data->{$log_filter_field . ".Filter"};
+			$filter =~ s/"/\\\"/g;
+			$text .= $log_filter_name . " = filter." . $filter . "\n";
+		}
+	}
+
+	for ( my $i = 0; $i < $max_log_objects; $i = $i + 1 ) {
+		my $log_object_field = "LogObject";
+		if ( $i > 0 ) {
+			$log_object_field = $log_object_field . "$i";
+		}
 
 		my $log_object_filename = $data->{$log_object_field . ".Filename"} || "";
 		if ( length($log_object_filename) > 0 ) {
+			my $log_object_type					= $data->{$log_object_field . ".Type"} || "ascii";
 
 Review comment:
   Nit: Internal line spacing should use spaces, not tabs.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services