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

Logger Output #259

Open
rwhite-lightbox opened this issue Feb 13, 2024 · 1 comment
Open

Logger Output #259

rwhite-lightbox opened this issue Feb 13, 2024 · 1 comment
Assignees

Comments

@rwhite-lightbox
Copy link

Is it possible to cleanup or simplify the output from the logger when in development or running from serverless-offline? The JSON is basically unreadable in a command window.

Here is how I'm declaring lambda-api:
const api = require('lambda-api')( { base: '/api',
compression: true,
logger: { level: 'warn',
stack: process.env.STAGE_ENV === 'DEV' ? true : false } } );

I'm only using res.log.error in my caught error handlers:
} catch (error) {
req.log.error(Unable to gather settings.);
req.log.error(error);

@Swolebrain
Copy link

I also want access to a simple log format so i can log raw JSON and take advantage of cloudwatch EMF metrics

@naorpeled naorpeled self-assigned this Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants