You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Puppy in a swift-log context with multiple handlers (console and file rotation) only the first handler added to a Puppy instance is invoked. For example:
The ordering of the handlers does not seem to matter. If I add the console handler first then messages are logged to the console but not the file handler (though the file is created) and vice versa.
This particular application has a somewhat convoluted logging setup necessitated by the steps required to pass metadata (in this case a remote address property) in a gRPC server context and the need to create a custom swift-log wrapper that can be updated (with the remote address metadata) and not trigger compiler warnings which necessitates making the wrapper @unchecked Sendable.
I don't think that's the problem but I am also not super familiar with Sendable yet. I am pretty sure I doing everything as explained in the docs but maybe I am missing something?
Thanks,
The text was updated successfully, but these errors were encountered:
Using Puppy in a swift-log context with multiple handlers (console and file rotation) only the first handler added to a
Puppy
instance is invoked. For example:https://github.com/sfomuseum/swift-image-emboss-grpc/blob/main/Scripts/image-emboss-grpc-server/Server.swift#L48-L73
The ordering of the handlers does not seem to matter. If I add the console handler first then messages are logged to the console but not the file handler (though the file is created) and vice versa.
This particular application has a somewhat convoluted logging setup necessitated by the steps required to pass metadata (in this case a remote address property) in a gRPC server context and the need to create a custom swift-log wrapper that can be updated (with the remote address metadata) and not trigger compiler warnings which necessitates making the wrapper
@unchecked Sendable
.https://github.com/sfomuseum/swift-image-emboss-grpc/blob/main/Sources/ImageEmbossGRPC/Interceptors.swift
https://github.com/sfomuseum/swift-image-emboss-grpc/blob/main/Sources/ImageEmbossGRPC/Logger.swift
https://github.com/sfomuseum/swift-image-emboss-grpc/blob/main/Sources/ImageEmbossGRPC/Embosser.swift#L21
I don't think that's the problem but I am also not super familiar with
Sendable
yet. I am pretty sure I doing everything as explained in the docs but maybe I am missing something?Thanks,
The text was updated successfully, but these errors were encountered: