@technote-space/github-action-log-helper
TypeScript icon, indicating that this package has built-in type declarations

0.2.19 • Public • Published

Github Action Log Helper

npm version CI Status codecov CodeFactor License: MIT

Read this in other languages: English, 日本語.

Logging helpers for GitHub Actions.

Table of Contents

Details

Install

yarn

  • yarn add @technote-space/github-action-log-helper

npm

  • npm i @technote-space/github-action-log-helper

Logger

import { Logger } from '@technote-space/github-action-log-helper';

const logger = new Logger();
logger.startProcess('Process name');
logger.displayCommand('command');
logger.displayStdout('stdout1\nstdout2');
logger.displayStderr('stderr1\nstderr2');
logger.log();
logger.info('output info');
logger.endProcess();

// ::group::Process name
// [command]command
//   >> stdout1
//   >> stdout2
// ::warning::  >> stderr1
// ::warning::  >> stderr2
// 
// > output info
// ::endgroup::

logger.getColorString('colored text', 'green'); // Color: 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white'
logger.getColorString('colored text', 'yellow', 'underline'); // Attribute: 'bold' | 'underline' | 'italic'
logger.c('colored text', 'yellow', 'underline'); // alias

Author

GitHub (Technote)
Blog

Readme

Keywords

Package Sidebar

Install

npm i @technote-space/github-action-log-helper

Weekly Downloads

41

Version

0.2.19

License

MIT

Unpacked Size

29.3 kB

Total Files

10

Last publish

Collaborators

  • technote