deno-library / logger

logger for deno
MIT License
25 stars 2 forks source link

deno 2.0 remove the Deno.close() API #17

Open zxzlf opened 1 week ago

zxzlf commented 1 week ago

Got error when stop the old log

TypeError: close is not a function at Writable.close (https://jsr.io/@deno-lib/logger/1.1.6/writable.ts:48:5) at Writer.write (https://jsr.io/@deno-lib/logger/1.1.6/writer.ts:72:54) at Logger.write (https://jsr.io/@deno-lib/logger/1.1.6/logger.ts:94:25) at Logger.info (https://jsr.io/@deno-lib/logger/1.1.6/logger.ts:49:18)

当前设置的按天新建日志文件,每到0点的时候就开始报错,翻了一下官方文档,应该就是2.0里面Deno.close() API被移除的原因,我看你writable.ts里面已经写好适配2.0的代码,不过注释掉了,现在2.0正式发布了,是不是可以拿出来用了

fuxingZhang commented 1 week ago

Can you submit a pull request? I'd be happy to merge it. You can submit any other API upgrades.

zxzlf commented 1 week ago

Can you submit a pull request? I'd be happy to merge it. You can submit any other API upgrades.

我翻了一下,目前应该就只有这个close()在2.0里面移除了,writeAll()虽然也被移除了,但是你前面已经换成JSR的了

fuxingZhang commented 1 week ago

@zxzlf Landed on v1.1.7

fuxingZhang commented 1 week ago

@UrielCh @zxzlf

https://github.com/deno-library/logger/blob/master/changelog.md

v1.1.7 - 2024.11.11

Why move from @deno-lib/logger to @deno-library/logger

Update Notice: Transition from @deno-lib/logger to @deno-library/logger

We are transitioning the package name from @deno-lib/logger to @deno-library/logger to maintain consistency with the deno-library GitHub repository and to better integrate with the Deno ecosystem.

Key Points:

Action Required: Please update your imports and dependencies to use @deno-library/logger instead of @deno-lib/logger. For detailed instructions and any additional information, refer to the official documentation.

Example:

import { Logger } from "jsr:@deno-library/logger";

const logger = new Logger();

We appreciate your support and cooperation. If you have any questions or run into issues, feel free to reach out via the GitHub issues page.

Thank you for being a part of the Deno community!

fuxingZhang commented 1 week ago

@UrielCh

I have fixed it

But I can't fix it

I need your help

https://github.com/deno-library/logger/actions/workflows/npm-publish.yml

UrielCh commented 1 week ago

It's maybe Time to give up DNT and Switch to JSR. The migration mostly consists in preparing a clear README and releaseing it by hand.

UrielCh commented 1 week ago

JSR repo is not compatible with https import like the legacy deno X

fuxingZhang commented 1 week ago

@UrielCh I understand, thanks for your help!

It's maybe Time to give up DNT and Switch to JSR. The migration mostly consists in preparing a clear README and releaseing it by hand.