Logging with MetaLama #10
-
Hi I watched the recent (March 15th) webinar, excellent by the way, and thought that now would be a good time to start getting to know MetaLama. Whilst I am by no means a PostSharp expect those bits of it that I have learnt to use properly are superb and it seems only sensible to learn how to adapt what i know to MetaLama, especially in the light of your answer to the question about whether PostSharp and MetaLama would work in co-existence. To that end I thought that I would start with Logging. I saw the examples that you had in the webinar and I've looked at the online samples and the documentation. Could you answer the following questions. Is there still work to do on logging? I'm used to the concept of Backend providers and configuration files in PostSharp connected with this. If it's not yet complete then I'll wait and concentrate on trying something else but if it is are there any examples demonstrating it's use with a logging provider like serilog or loupe by way of two examples? This really looks great, I admire the work you've done and truly wish I understood more of the concepts behind it all. Dom |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
a couple of re-watches of the webinar and I now see that fabrics are essentially doing the work of the configuration files that existed in PostSharp, very neat. What I am still missing though is how you intend for Metalama logging to integrate with loggers like serilog or loupe. If there are any articles anywhere, or examples, that you could point me towards I'd be really grateful. |
Beta Was this translation helpful? Give feedback.
-
Serilog sorted, at least with the basic configuration. Now to finesse it. |
Beta Was this translation helpful? Give feedback.
-
Hi Dom, PostSharp Logging is not yet ported to Metalama, so you have to write your logging aspect yourself, from scratch. Your aspect should write code for the specific logging framework that you have chosen. The PostSharp logging framework, which provides an abstraction over other framework, is quite complex and I would not recommend, at this stage, creating aspects that generate code for PostSharp Logging. This will be our job in the upcoming months. |
Beta Was this translation helpful? Give feedback.
Hi Dom,
PostSharp Logging is not yet ported to Metalama, so you have to write your logging aspect yourself, from scratch.
Your aspect should write code for the specific logging framework that you have chosen. The PostSharp logging framework, which provides an abstraction over other framework, is quite complex and I would not recommend, at this stage, creating aspects that generate code for PostSharp Logging. This will be our job in the upcoming months.