Skip to content

Commit

Permalink
Merge pull request #87 from josearaujodev/josearaujodev/changeClsImpl…
Browse files Browse the repository at this point in the history
…ementation

Use cls-hooked package instead of continuation-local-storage
  • Loading branch information
KSDaemon committed Oct 10, 2022
2 parents 0173d9c + 25f8786 commit ca70c7d
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 44 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = sails => {
const cls = sails.config[this.configKey].clsNamespace;
// If custom log function is specified, use it for SQL logging or use sails logger of defined level
if (typeof cls === 'string' && cls !== '') {
Sequelize.useCLS(require('continuation-local-storage').createNamespace(cls));
Sequelize.useCLS(require('cls-hooked').createNamespace(cls));
}

if (sails.config[this.configKey].exposeToGlobal) {
Expand Down
87 changes: 45 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"supertest": "^6.2.3"
},
"dependencies": {
"continuation-local-storage": "^3.2.1",
"cls-hooked": "^4.2.2",
"sequelize": "^6.19.0"
},
"directories": {
Expand Down

0 comments on commit ca70c7d

Please sign in to comment.