I am using the AWS Cloudwatch Log agent. It works well, great. I have a configuration like this:
[type1]
datetime_format = %Y-%m-%d %H:%M:%S
file = /var/log/payment_type1.log
buffer_duration = 5000
log_stream_name = payment
initial_position = start_of_file
log_group_name = type1
[type2]
datetime_format = %Y-%m-%d %H:%M:%S
file = /var/log/payment_type2.log
buffer_duration = 5000
log_stream_name = payment
initial_position = start_of_file
log_group_name = type2
I have one section for each payment method. Is it possible to group all these sections in one? And add the variable to the log_group_name tag. Something like this, for example?
[type]
datetime_format = %Y-%m-%d %H:%M:%S
file = /var/log/payment_(<my_type>.*).log
buffer_duration = 5000
log_stream_name = payment
initial_position = start_of_file
log_group_name = my_type
Thank you for your help.
Eric
source
share