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

Cannot enable AWS query logging #303

Open
lyricnz opened this issue Apr 11, 2024 · 3 comments
Open

Cannot enable AWS query logging #303

lyricnz opened this issue Apr 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@lyricnz
Copy link
Contributor

lyricnz commented Apr 11, 2024

If I uncomment the "logger" parameter to the AWS client constructor (and add the import)
https://github.com/Innablr/revolver/blob/develop/lib/awsConfig.ts#L30
it fails with a problem around a circular JSON reference
"Converting circular structure to JSON\n --> starting at object with constructor 'HTTPParser'\n | property 'socket' -> object with constructor 'TLSSocket'\n --- property 'parser' closes the circle"

Possibly got broken with the SDK v3 update

image
@lyricnz
Copy link
Contributor Author

lyricnz commented Apr 14, 2024

PS: this appears to only be an issue in Lambda - works fine on local.

@lyricnz
Copy link
Contributor Author

lyricnz commented Apr 15, 2024

Is problem with tslog/node on AWS/Lambda? Even an explicitly circular object on local works fine.

const one: {'two': any} = {
  'two': null,
};

const two = {
  'one': one,
}

async function main(config: any) {
  one.two = two;
  logger.info(two);

emits

2024-04-15 10:37:55.814 INFO    /revolver.js:56 revolver        {
  one: {
    two: {
      one: <ref *1> {
        two: {
          one: [Circular *1]
        }
      }
    }
  }
}

@lyricnz lyricnz added the bug Something isn't working label Apr 15, 2024
@lyricnz
Copy link
Contributor Author

lyricnz commented May 2, 2024

Can get full HTTP by defining $NODE_DEBUG=http

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant