Read the directory file name with logstash

I have logs file located in C:/<project>/log/<wlsDomain>/<wlsServerName>/access.*.log
I have written a logstash conf file to read the logs but how can I also read the directory name wlsDomain in logstash as a new field?

You'll get the full pathname of the input file in the path field. Use a grok filter to extract everything up to the last slash.