The present invention relates to a wavelength-swept laser and a method for generating laser output. The wavelength-swept pulse laser according to one aspect of the present invention uses spontaneous mode-locking to produce a pulse output with the center wavelength continuously varying with time. On the contrary, the wavelength-swept laser according to another aspect of the present invention suppresses mode-locking to produce continuous output by tuning the filter frequency change speed to the frequency shift speed of the frequency shifter. The lasers of the present invention are applicable to optical sensing or WDM optical communication.