https://github.com/technote-space/github-action-log-helper
Logging helpers for GitHub Actions
https://github.com/technote-space/github-action-log-helper
github-actions
Last synced: 4 months ago
JSON representation
Logging helpers for GitHub Actions
- Host: GitHub
- URL: https://github.com/technote-space/github-action-log-helper
- Owner: technote-space
- License: mit
- Created: 2020-09-20T14:42:28.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-12-28T02:22:08.000Z (over 2 years ago)
- Last Synced: 2025-10-06T00:33:02.565Z (9 months ago)
- Topics: github-actions
- Language: TypeScript
- Homepage:
- Size: 2.39 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.ja.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Github Action Log Helper
[](https://badge.fury.io/js/%40technote-space%2Fgithub-action-log-helper)
[](https://github.com/technote-space/github-action-log-helper/actions)
[](https://codecov.io/gh/technote-space/github-action-log-helper)
[](https://www.codefactor.io/repository/github/technote-space/github-action-log-helper)
[](https://github.com/technote-space/github-action-log-helper/blob/master/LICENSE)
*Read this in other languages: [English](README.md), [日本語](README.ja.md).*
GitHub Actions 用のログヘルパー
## Table of Contents
Details
- [インストール](#%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB)
- [yarn](#yarn)
- [npm](#npm)
- [Logger](#logger)
- [Author](#author)
## インストール
### yarn
- `yarn add @technote-space/github-action-log-helper`
### npm
- `npm i @technote-space/github-action-log-helper`
## Logger
```typescript
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)](https://github.com/technote-space)
[Blog](https://technote.space)