
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@standardbeagle/ai-logger
Advanced tools
Full-stack logging system for Next.js applications with request-scoped logging, client-side logging, and automatic error persistence. Features memory-efficient logging with Winston integration.
A full-stack logging system for Next.js applications with request-scoped logging, client-side logging, and automatic error persistence.
npm install @standardbeagle/ai-logger
# or
yarn add @standardbeagle/ai-logger
# or
pnpm add @standardbeagle/ai-logger
import { RequestLogger, loggerMiddleware } from '@standardbeagle/ai-logger';
// In your Next.js middleware
export default loggerMiddleware(async (req, res) => {
RequestLogger.info('Processing request', { path: req.url });
try {
// Your request handling logic
await processRequest(req);
RequestLogger.info('Request processed successfully');
} catch (error) {
RequestLogger.error('Request failed', { error });
throw error;
}
});
// Using the run method for custom scopes
await RequestLogger.run({ requestId: 'custom-operation' }, async () => {
RequestLogger.info('Starting operation');
// Your code here
RequestLogger.info('Operation completed');
});
import { LogProvider, useLogger, LogFrame } from '@standardbeagle/ai-logger';
// Wrap your app with LogProvider
function App() {
return (
<LogProvider>
<YourComponents />
</LogProvider>
);
}
// Use the logger in components
function YourComponent() {
const logger = useLogger();
const handleClick = () => {
logger.info('Button clicked', { componentName: 'YourComponent' });
};
return <button onClick={handleClick}>Click me</button>;
}
// Use LogFrame for automatic operation logging
function Operation() {
return (
<LogFrame
name="user-operation"
onError={(error) => console.error('Operation failed:', error)}
>
<YourOperationComponents />
</LogFrame>
);
}
import { getWinstonLogger } from '@standardbeagle/ai-logger';
const logger = getWinstonLogger({
logPath: 'logs/app.log',
logLevel: 'debug',
silent: process.env.NODE_ENV === 'test'
});
import { RequestLogger } from '@standardbeagle/ai-logger';
RequestLogger.setDefaultLogLevel('debug');
See API.md for detailed API documentation.
Request Scoping: Always use the middleware or RequestLogger.run() to ensure proper request scoping.
Error Handling: Let errors propagate naturally - the logger will automatically persist logs on errors.
Context Management: Use LogFrame components to create logical operation boundaries in your React components.
Metadata: Include relevant metadata with your log entries for better debugging context.
RequestLogger.info('User action completed', {
userId: user.id,
action: 'purchase',
itemId: item.id
});
MIT - See LICENSE for details.
FAQs
Full-stack logging system for Next.js applications with request-scoped logging, client-side logging, and automatic error persistence. Features memory-efficient logging with Winston integration.
We found that @standardbeagle/ai-logger 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.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.