Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STRF-9658 log level support for hb logger #266

Merged
merged 1 commit into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Pending
- Bumps paper-handlebars to 4.5.2 [#262](https://github.com/bigcommerce/paper/pull/262)
## 3.0.0 (2022-02-08)
* Deprecating 2x branch as it's not used and maintained anymore

Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ class Paper {
* @param {String} rendererType - One of ['handlebars-v3', 'handlebars-v4']
* @param {Object} logger - a console-like logger object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a line to the doc string here?

*/
constructor(siteSettings, themeSettings, assembler, rendererType, logger = console) {
constructor(siteSettings, themeSettings, assembler, rendererType, logger = console, logLevel = 'info') {
this._assembler = assembler || {};

// Build renderer based on type
switch(rendererType) {
case 'handlebars-v4':
this.renderer = new HandlebarsRenderer(siteSettings, themeSettings, 'v4', logger);
this.renderer = new HandlebarsRenderer(siteSettings, themeSettings, 'v4', logger, logLevel);
break;
case 'handlebars-v3':
default:
this.renderer = new HandlebarsRenderer(siteSettings, themeSettings, 'v3', logger);
this.renderer = new HandlebarsRenderer(siteSettings, themeSettings, 'v3', logger, logLevel);
break;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"homepage": "https://github.com/bigcommerce/paper",
"dependencies": {
"@bigcommerce/stencil-paper-handlebars": "4.5.1",
"@bigcommerce/stencil-paper-handlebars": "4.5.2",
"accept-language-parser": "~1.4.1",
"messageformat": "~0.2.2"
},
Expand Down