Log rules to write log to many tables

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Log rules to write log to many tables

scvn80
Hello everyone.

 I've just start using Nlog. I need to write log to Database, as example below:
 - january : write to table Log_january
 - February : write to table Log_February
 - March : write to table Log_March
...v.v...
 - December : write to table Log_December

How can I do this ?
Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Log rules to write log to many tables

Jason LaFlair
Administrator
Just my two cents, but wouldn't it make more sense to write one config to log to a single table.

Then on the database side:

1) just use T-SQL to get the data you want
2) create a view for each needed month
3) create an ETL process to break the single table into the 12 monthly tables

No reason to add complexity to a configuration when the destination offers more simplistic options.