F-007: Logging
Closed this issue · 1 comments
Description
As a user I want Webpack to output log messages of the plugin execution.
Per default the log output should contain a message indicating the name of the plugin, the output file that has been generated, and an indication that it has been successfully generated, e.g:
[GenerateFileWebpackPlugin] [output.txt] [generated]
Further, it should be possible to configure the plugin to output additional debug information by a configuration switch,
In case the debug switch has been turned on, the complete lifecycle of the plugin should be logged, eg:
[GenerateFileWebpackPlugin] [created]
[GenerateFileWebpackPlugin] [called]
[GenerateFileWebpackPlugin] [emit.tapAsync]
[GenerateFileWebpackPlugin] [output.txt] [generating]
[GenerateFileWebpackPlugin] [output.txt] [generated']
Examples
module.exports = {
...
plugins: [
generate({
debug: true,
file: 'output.txt',
content: 'Some content'
})
]
};
module.exports = {
...
plugins: [
generate({
debug: false,
file: 'output.txt',
content: 'Some content'
})
]
};
module.exports = {
...
plugins: [
generate({
file: 'output.txt',
content: 'Some content'
})
]
};
Done