Comments (6)
Hm, I think as I consider this more I'm actually convinced that we should have this. Thanks for the feedback.
Ultimately, while the other logging functions do have special implementations on the runner, we're exposing a logging interface and the author shouldn't have to understand that distinction. Addressed in #111
from toolkit.
I think you can do this with a simple console.log
statement, is there a use case where something else is necessary?
from toolkit.
I believe this is the case, but it seems odd that you would use debug()
, error()
and warning()
from @actions/core
and then just use a built-in console.log
otherwise. I would expect that all of the logging should occurring using methods from the same object.
from toolkit.
I think the difference is that our runner has built in commands for debug/error/warning so that it processes them differently (e.g. color coding), while there's no command for info (and it doesn't really make sense for there to be one). I think I'd personally be more confused by why a function like that would exist/would assume it was hooked up to a special runner command as well.
from toolkit.
Okay, I am happy to use console.log
.
As a data point in terms of discoverability/intiutation (and its obviously just a single data point), I expected the info()
method to exist as there is a section for Logging Commands
, so I figured that would be how all of my logging should be done.
toolkit/packages/core/src/core.ts
Line 107 in 2a1b7d5
from toolkit.
I was confused by this at first too. Once I realized what the core.debug()
etc. functions did it made sense why there wasn't one for info. It could be useful to mention this in the docs.
I've been considering creating my own logger that uses the methods from this package when available, and then fall back to console
for the rest. That way I have a consistent logging experience.
Another option was to use console
everywhere and then replace console.debug
etc. with the copies from this package. This would also work better with other packages that use the console
functions.
from toolkit.
Related Issues (20)
- Decompress based on `content-encoding` in `downloadTool`
- Links created for annotations are (sometimes) broken
- Multiline annotations are not correctly displayed.
- Call another github action like an async function call HOT 2
- `@actions/core` can't be imported in Node 20 HOT 3
- Error logging is lossy
- Question: Why are cache entries uploaded in chunks of 32MB?
- Allow customizing the `GITHUB_SERVER_URL` for GHE instances
- licenseosi HOT 3
- Please remove misleading hope-giving line from main README.md
- Artifact upload speeds are artificially bottle necked to 8 MB chunks HOT 5
- Introduce the ability to interrupt exec() using signal (PR: #1469)
- Allow caching without compression
- Issue for bug
- AƧık
- Multiline Problem Matcher HOT 3
- Support the latest Octokit in `@actions/github` HOT 1
- Would github write a official ssh deploy actions,third party isn't good enough HOT 2
- Core Summary should be more flexible HOT 4
- Calling glob() on a directory of 200k files produces a RangeError: Maximum call stack size exceeded
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toolkit.