
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
nuxt-browser-console
Advanced tools
show server-side & clinet-side logs/errors/warnings inside browser console
receive server-side and client-side logs/errors/warnings inside the browser console
With this module, you can use browser console methods. No matter you are using this module inside the server or client, the messages are always shown in the browser console. A good and cheap way to monitoring server events in the production environment (for example, Axios request and response information can be logged into the browser console).
nuxt-browser-console dependency with yarn or npm to your projectyarn add nuxt-browser-console # or npm install nuxt-browser-console
nuxt-browser-console to the modules section of nuxt.config.js{
modules: [
// Simple usage
'nuxt-browser-console',
// With options
['nuxt-browser-console', { /* module options */ }]
],
browserConsole: {
/* module options */
}
}
Module default options:
| Option | Default | Description |
|---|---|---|
| namespace | console | the namespace of the module. this.$console.log(...) or $console.log(...) inserted fom nuxt context |
{
browserConsole: {
namespace: 'console'
}
}
You can simply use this module through this or context $console almost every where in your Nuxt app.
this.$console.log(...args)
Available methods:
$console.log(obj1 [, obj2, ..., objN])
$console.info(obj1 [, obj2, ..., objN])
$console.warn(obj1 [, obj2, ..., objN])
$console.error(obj1 [, obj2, ..., objN])
$console.clear()
$console.groupCollapsed([label])
$console.groupEnd()
An example to show how to use this module to log some data inside the browser (no matter server-side/client-side).
export default function ({$axios, $console}) {
const style = "background: #d32f2f;border-radius: 0.5em;color: white;font-weight: bold;padding: 2px 0.5em;";
$axios.interceptors.response.use((x) => {
$console.groupCollapsed('', `%cRequest to ${x.config.url.split("?")[0]}`, style);
$console.info('URL:', `${x.config.baseURL}${x.config.url}`);
$console.info('Method:', x.config.method.toUpperCase());
$console.info('Status:', `${x.statusText || 'OK'} (${x.status})`);
$console.groupEnd();
return x;
});
}
yarn install or npm installyarn dev or npm run devCopyright (c) Mohammad Saleh Fadaei (@ms-fadaei)
FAQs
show server-side & clinet-side logs/errors/warnings inside browser console
The npm package nuxt-browser-console receives a total of 12 weekly downloads. As such, nuxt-browser-console popularity was classified as not popular.
We found that nuxt-browser-console demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.