If resource permits, definitely use the DB. A plain text file is hard to "use" (unless writing a shit load of perl or whatever just to digest the file is within your definition of easy); a DB, OTOH, ...
.NET Core provides a framework that logging systems can be snapped into. However, what's most important about this framework is how you write your messages out. It's the quality of the message that ...