You can do this with the ALTER DATABASE command , but you still have to move the file manually. ALTER commands are as follows:
ALTER DATABASE YourDb SET OFFLINE;
ALTER DATABASE YourDb
MODIFY FILE (Name = YourDb_Log,
Filename = 'g:\NewDir\YourDb.ldf')
<At this point, move the file in the filesystem>
ALTER DATABASE YourDb SET ONLINE;
RECONFIGURE
For more information, see the SqlServer Central article and the full script for performing the move.