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

Setting log.options.logHandler doesn't seems to work #45

Open
cldsnchz opened this issue Jun 2, 2021 · 1 comment
Open

Setting log.options.logHandler doesn't seems to work #45

cldsnchz opened this issue Jun 2, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@cldsnchz
Copy link

cldsnchz commented Jun 2, 2021

Hi, when I set log.options.logHandler = myConsole and the call log.info("test") myConsole is not being invoked.

However the following 2 alternatives work fine:
log.console = myConsole and log = new LambdaLog({logHandler: myConsole})

I think this is because internally LambdaLog use the property console and that property is only set during the constructor.
I mention this because the documentation uses log.options.logHandler = myConsole

I'm using version 3.0.0

BTW the property options.logHandler it is not defined in the typescript types.

Thanks

@KyleRoss KyleRoss self-assigned this Jun 23, 2021
@KyleRoss KyleRoss added the bug label Jun 23, 2021
@KyleRoss KyleRoss added this to the v4.0.0 milestone Oct 11, 2021
This was referenced Nov 17, 2021
@Mudpuppy12
Copy link

Ah, got bitten by this. Thank you for the workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants