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

outputTemplate: support #5

Closed
nblumhardt opened this issue Oct 9, 2018 · 5 comments
Closed

outputTemplate: support #5

nblumhardt opened this issue Oct 9, 2018 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@nblumhardt
Copy link
Member

nblumhardt commented Oct 9, 2018

Although this sink can't use the built-in output template formatting directly, it should still be possible to accept and control output using a regular output template, e.g.:

WriteTo.BrowserConsole(outptTemplate: "{Message} {Properties}{NewLine}{Exception}")

The regular Console sink does something similar to support theming.

@zetroot
Copy link
Contributor

zetroot commented May 5, 2021

Looks great feature, i would like to participate in this feature.
I am quite new to Serilog, so i have several questions. Could you clarify the task?
As far as i can understand, words in curly brackets are some kind of key-words.
Ok, Message stands for logging message, i understand,
NewLine - stands for Environment.NewLine property, ok.
Exception - should be added if there is an exception passed to log method.
What are Properties?

@zetroot
Copy link
Contributor

zetroot commented May 5, 2021

Oh, i see, Properties stands for LogEvent._properties member. Now it seems clearer for me.
What about other kinds of keywords?

@nblumhardt
Copy link
Member Author

Hi @zetroot! https://github.com/serilog/serilog/wiki/Formatting-Output#formatting-plain-text has the info you need, I think.

@zetroot
Copy link
Contributor

zetroot commented May 6, 2021

Thank you @nblumhardt !
Now it became much clearer for me

@nblumhardt
Copy link
Member Author

Merged in #13 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants