Dynamic name in the path of filebeat

I wanted to give dynamic name in the path section of filebeat ex.
paths:
- /var/log/ABC/{hostname}/*.log

can the hostname field be dynamic???

You should be able to use /var/log/*/*.log