To trace locks and deadlocks, you can write error messages to the event log of the server.  To do this use:-

DBCC TRACEON (1204,-1)

The 1204 is the event type to capture, for deadlocks you want to enable trace for 1204 and 1222.  A full list of event types can be found at http://msdn.microsoft.com/en-us/library/ms188396.aspx

To disable trace use :-

DBCC TRACEOFF (1204,-1)