Replies: 2 comments 3 replies
-
I don't get how "if we don't know where does the message come from" correlates with "it misses the purpose of logging". Surely the point of logging is to get clear information across. Is "Running static queries" not obvious, do I need to know the plugin name to know what it's doing? In addition surely just running the following is easy:
|
Beta Was this translation helpful? Give feedback.
-
It's currently not documented (and we need to change it both in the API docs and in the source plugin tutorial) but there's a gatsby/packages/gatsby-source-shopify/src/gatsby-node.ts Lines 263 to 299 in 2eb57c7 You can define custom errors with IDs and when you use Anyways, it'll prefix the error with the name of the plugin: |
Beta Was this translation helpful? Give feedback.
-
Often we append the plugin name (e.g.
[gatsby-plugin-your-plugin]
) to a message when we log it via the reporter in the Node API.The benefit is obvious because if we don't know where does the message come from, it misses the purpose of logging.
So why can't we have a feature that automatically appends the plugin name to each message? It will save every single plugin developer to add the prefix manually in each of the messages!
Beta Was this translation helpful? Give feedback.
All reactions