--- title: log comments: true description: '' --- Print a message to the Command Log within Cypress. | | | |--- | --- | | **Returns** | null | | **Timeout** | *cannot timeout* | # [cy.log( *message* )](#usage) Print the message to the Command Log. # [cy.log( *message*, *arguments* )](#arguments-usage) Print the message to the Command Log, along with any arguments. # Usage ## Log a message to the Command Log. ```javascript cy.log('Login successful') ``` # Arguments Usage ## Log a message with arguments to the Command Log. ```javascript // print previously saved variable 'events' to the Command Log. cy.log('events triggered', events) ``` # Command Log ## Print messages with arguments to the Command Log. ```javascript cy .log('log out any message we want here') .log('another message', ['one', 'two', 'three']) ``` The commands above will display in the command log as: command log with cy.log When clicking on `log` within the command log, the console outputs the following: console display of cy.log