You can find the names of all the log files using this query:SELECT * FROM sys.master_files WHERE type_Desc = 'LOG'
Once you have that, you can construct the SQL needed to shrink the files.
BUT, before you do any of that, please read this article by Paul Randal. http://www.sqlskills.com/blogs/paul/why-you-should-not-shrink-your-data-files/ I realize that there are occasions when one needs to shrink the log files such as after one-time operations that may have caused the log file to grow. But, shrinking log file routinely is very counter productive.