If your logs are in a custom format, you must write a custom parser (instructions). After you write the parser, you put the file into your /etc/td-agent/plugins/ directory.
Common Parser Examples
Arm Treasure Data provides two example parsers: “URL-param style key-value pairs” and “ascii character delimited format”. Both formats are fairly common among our users.