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

插件无法输出日志 #100

Closed
longjuan opened this issue Nov 27, 2023 · 3 comments · Fixed by #101
Closed

插件无法输出日志 #100

longjuan opened this issue Nov 27, 2023 · 3 comments · Fixed by #101
Assignees

Comments

@longjuan
Copy link
Member

之前上传时可以正常输出info级别日志,但是最近发现没日志了
提示

SLF4J: A SLF4J service provider failed to instantiate:
org.slf4j.spi.SLF4JServiceProvider: ch.qos.logback.classic.spi.LogbackServiceProvider not a subtype
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.

排除s3依赖中的slf4j即可

    implementation ('software.amazon.awssdk:s3') {
        exclude group: 'org.slf4j'
    }

/assign

@ruibaby
Copy link
Member

ruibaby commented Nov 27, 2023

这个问题与 Halo 的版本有关吗?

@longjuan
Copy link
Member Author

longjuan commented Nov 27, 2023

这个问题与 Halo 的版本有关吗?

应该无关,测试了2.9版本也不能输出,猜测是之前s3依赖升级到2.x带来的问题。

不,测试了2.9+1.6.1是可以输出日志的,而2.10+1.6.1就不行,确实是 Halo 版本升级带来的问题。

@ruibaby
Copy link
Member

ruibaby commented Nov 28, 2023

那感觉和这个的问题是一样的:#80

f2c-ci-robot bot pushed a commit that referenced this issue Dec 1, 2023
```release-note
修复无日志输出的问题
```
fixes #100 
测试上传,关联,删除,解除关联 4种操作的日志
```
---上传---
2023-11-27T22:39:22.139+08:00  INFO 7 --- [oundedElastic-5] run.halo.s3os.S3OsAttachmentHandler      : operation: createMultipartUpload, result: CreateMultipartUploadResponse(Bucket=test-1305034426, Key=test/image-pjcl.png, UploadId=17010959629c897f8b8c1a592b0efe300de867a1ea3e891cf04b4f95c6986470a0f30195be)
2023-11-27T22:39:22.391+08:00  INFO 7 --- [oundedElastic-5] run.halo.s3os.S3OsAttachmentHandler      : operation: uploadPart, result: UploadPartResponse(ETag="aa84eea735192b49552fa5bf3df317fa")
2023-11-27T22:39:22.547+08:00  INFO 7 --- [oundedElastic-5] run.halo.s3os.S3OsAttachmentHandler      : operation: completeUpload, result: CompleteMultipartUploadResponse(Location=http://test-1305034426.cos.ap-guangzhou.myqcloud.com/test/image-pjcl.png, Bucket=test-1305034426, Key=test/image-pjcl.png, ETag="afdd5ce39cf49676238fcfc879664b55-1")
2023-11-27T22:39:22.616+08:00  INFO 7 --- [oundedElastic-5] run.halo.s3os.S3OsAttachmentHandler      : operation: getMetadata, result: HeadObjectResponse(AcceptRanges=bytes, LastModified=2023-11-27T14:39:22Z, ContentLength=1420, ETag="afdd5ce39cf49676238fcfc879664b55-1", ContentType=image/png, Metadata={})
2023-11-27T22:39:22.616+08:00  INFO 7 --- [oundedElastic-5] run.halo.s3os.S3OsAttachmentHandler      : Upload object test/image-pjcl.png to bucket test-1305034426 successfully
2023-11-27T22:39:22.626+08:00  INFO 7 --- [oundedElastic-5] run.halo.s3os.S3OsAttachmentHandler      : Build attachment test/image-pjcl.png successfully
2023-11-27T22:39:29.915+08:00  WARN 7 --- [or-http-epoll-1] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: run.halo.s3os.S3LinkController
---关联---
2023-11-27T22:39:34.657+08:00  INFO 7 --- [oundedElastic-5] run.halo.s3os.S3OsAttachmentHandler      : Build attachment test/34.txt successfully
---解除关联---
2023-11-27T22:39:39.937+08:00  INFO 7 --- [tReconciler-t-1] run.halo.s3os.S3OsAttachmentHandler      : Skip deleting object test/34.txt from S3.
---删除---
2023-11-27T22:39:44.290+08:00  INFO 7 --- [oundedElastic-5] run.halo.s3os.S3OsAttachmentHandler      : operation: delete object, result: DeleteObjectResponse()
2023-11-27T22:39:44.291+08:00  INFO 7 --- [oundedElastic-5] run.halo.s3os.S3OsAttachmentHandler      : Delete object test/image-pjcl.png from bucket test-1305034426 successfully
```
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

Successfully merging a pull request may close this issue.

2 participants