2020-10-21 13:26:08 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
function gh_log( $content ) {
|
2020-10-21 13:28:25 +08:00
|
|
|
echo $content . PHP_EOL;
|
2020-10-21 13:26:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
function gh_log_group_start( $content ) {
|
2020-10-21 13:28:25 +08:00
|
|
|
gh_log( "###[group]$content" );
|
2020-10-21 13:26:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
function gh_log_group_end() {
|
2020-10-21 13:28:25 +08:00
|
|
|
gh_log( '###[endgroup]' );
|
2020-10-21 13:26:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
function gh_log_yellow( $content ) {
|
2020-10-21 13:28:25 +08:00
|
|
|
gh_log( "###[warning]$content" );
|
2020-10-21 13:26:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
function gh_log_warning( $content ) {
|
|
|
|
gh_log_yellow( "⚠️ $content" );
|
|
|
|
}
|
|
|
|
|
|
|
|
function gh_log_red( $content ) {
|
2020-10-21 13:28:25 +08:00
|
|
|
gh_log( "###[error]$content" );
|
2020-10-21 13:26:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
function gh_log_error( $content ) {
|
|
|
|
gh_log_red( "🛑️ $content" );
|
|
|
|
}
|
|
|
|
|
|
|
|
function gh_log_debug( $content ) {
|
2020-10-21 13:28:25 +08:00
|
|
|
gh_log( "::debug::$content" );
|
2020-10-21 13:26:08 +08:00
|
|
|
}
|