
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
@brainhubeu/hadron-logger
Advanced tools
Hadron Logger provides an option to replace the default hadron logger (bunyan) to the one of your choice.
npm install @brainhubeu/hadron-logger --save
Pass the package as an argument for the Hadron bootstrapping function:
// ... importing and initializing other components
hadron(expressApp, [require('@brainhubeu/hadron-logger')], config);
That way, you should be able to get it from the Container like that:
const logger = container.take('logger');
logger.log('Hello, I am your logger');
logger.warm('Look out! I am your logger!');
logger.debug('Am I your logger?');
logger.error('I am not your logger!');
Notice: logger is a container key only for the default logger.
To setup your own logger, you need to provide an adapter first. You can do that by importing the registerAdapter method and calling it with name and provider function for your logger, like that:
const registerAdapter = require('@brainhubeu/hadron-logger').registerAdapter;
registerAdapter('myOwnLogger', function(config) {
return {
log: function(message) {
console.log(message);
},
warn: function(message) {
console.warn(message);
},
debug: function(message) {
console.debug(message);
},
error: function(message) {
console.error(message);
},
};
});
Provider takes the Hadron logger config as the first parameter.
After your adapter is set up, you can define your logger in the Hadron configuration and retrieve it using the logger's name.
const hadronConfig = {
// ...other stuff
logger: {
name: 'myLoggerName',
type: 'myOwnLogger',
},
};
// hadron initialization
const logger = Container.take('myLoggerName');
You can define multiple loggers for your application. To do that you just need to provide adapters for each of them and define them in the configuration.
const hadronConfig = {
// ...other stuff
logger: [
{ name: 'Logger1', type: 'logger1' },
{ name: 'logger2', type: 'logger2' },
{ name: 'logger3', type: 'logger3' },
],
};
// hadron initialization
container.take('Logger1');
container.take('Logger2');
container.take('Logger3');
FAQs
Hadron logger
The npm package @brainhubeu/hadron-logger receives a total of 5 weekly downloads. As such, @brainhubeu/hadron-logger popularity was classified as not popular.
We found that @brainhubeu/hadron-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.