Conversation
Signed-off-by: tison <wander4096@gmail.com>
This reverts commit 41640f7.
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
|
cc @andylokandy you may be interested at 272ea1e. I'm considering add a feature flag to bundle re-export otel in fastrace anyway ... |
Signed-off-by: tison <wander4096@gmail.com>
how will the reexported otel interact, where one is from logforth and the other is from fastrace? |
| /// Set the layout of the [`Syslog`] appender. | ||
| /// | ||
| /// Default to `None`, only the args will be logged. | ||
| pub fn with_layout(mut self, layout: impl Into<Layout>) -> Self { |
There was a problem hiding this comment.
The builder style is not inline with OpentelemetryLogBuilder:
let builder = OpentelemetryLogBuilder::new("my_service", "http://localhost:4317");
builder.label("env", "production");
Maybe choose one and apply for all of them?
There was a problem hiding this comment.
@andylokandy You may see 41640f7 and 0c8dce7.
I ever think of using one pattern, but later found that layout is good for builder, while other appenders are not builders, so layout can be misleading with a getter method.
There was a problem hiding this comment.
Or maybe anyway they are builder-alike so that we treat all of them builders 🤣
There was a problem hiding this comment.
I see. I'll prefer with_layout. A single word .layout sounds like a verb, while it actually has no side effect...
There was a problem hiding this comment.
Do you mean that we should change methods of OpentelemetryLogBuilder to align with the with_ flavor?
There was a problem hiding this comment.
Others should stay with the current with_ flavor and nothing need to be changed.
There was a problem hiding this comment.
I'm OK with the current method, you can send a patch with expected changes and let's discuss there >_<
| .build("logs") | ||
| .unwrap(); | ||
| let (writer, _guard) = NonBlockingBuilder::default().finish(rolling); | ||
| let (writer, _guard) = rolling_file::non_blocking_builder().finish(rolling); |
There was a problem hiding this comment.
maybe rolling_file::non_blocking().finish(rolling) or even rolling_file::non_blocking(rolling).finish()
There was a problem hiding this comment.
rolling_file::non_blocking(rolling).finish() looks good. Let me give it a try.
This closes fast/fasyslog#3.