Rcomian / bunyan-rotating-file-stream

Is an endpoint for bunyan that lets you control how much disk space logs take.
Other
29 stars 15 forks source link

Error while using with Next.js in standalone mode: Variable `filteredlogstats` is not defined. #42

Closed rgembalik closed 8 months ago

rgembalik commented 8 months ago

I am using this lib with Next.js compiled into standalone chunks. This leads to an error

Variable filteredlogstats is not defined.

My understanding is, that this line causes the issue: https://github.com/Rcomian/bunyan-rotating-file-stream/blob/e0616ace04b3166dc2745bb890c8aaaaed0cc63f/lib/datestampedfileops.js#L95

Variable filteredlogstats is being created and assigned without let/var/const keyword. Quick and easy solution would be to add it to the file.

Is my reasoning correct? Would it be ok if I drop-in a fix PR for it?

Rcomian commented 8 months ago

oh yes, certainly, good spot!

On Mon, 22 Jan 2024, 10:22 rgembalik, @.***> wrote:

I am using this lib with Next.js compiled into standalone chunks. This leads to an error

Variable filteredlogstats is not defined.

My understanding is, that this line causes the issue: https://github.com/Rcomian/bunyan-rotating-file-stream/blob/e0616ace04b3166dc2745bb890c8aaaaed0cc63f/lib/datestampedfileops.js#L95

Variable filteredlogstats is being created and assigned without let/var/ const keyword. Quick and easy solution would be to add it to the file.

Is my reasoning correct? Would it be ok if I drop-in a fix PR for it?

— Reply to this email directly, view it on GitHub https://github.com/Rcomian/bunyan-rotating-file-stream/issues/42, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFHFBRAYUIHJX6QK5HSAYTYPY4XLAVCNFSM6AAAAABCE6FRX6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGA4TGNJXHAYDENQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>