DECLARE @LOGSPACE TABLE 
(DATABASE_NAME    sysname,
 LOG_SIZE_MB      FLOAT,
 LOG_USE_PERCENT  FLOAT,
 STATUS           INT);
 
INSERT INTO @LOGSPACE
EXEC ('DBCC SQLPERF(LOGSPACE);');

SELECT * FROM @LOGSPACE WHERE LOG_USE_PERCENT > 30;