Function warn_log

Source
pub fn warn_log(msg: &str, parameters: Option<LogParameters>)
Expand description

Creates a warning message and prints the message to the log.

This message will create an annotation.

GitHub’s documentation: Setting a warning message

§Example usage

use actions_github::logger;
logger::warn_log("Missing name of project", None);

§Custom annotations

You can also set custom annotations to mention a specific line in a file. See LogParameters for more info.

use actions_github::logger;
logger::warn_log("Missing name of project", Some(logger::LogParameters {
    title: String::from("Missing name"),
    file: String::from("src/lib.rs"),
    line: 1,
    end_line: 3
}));