lucascebertin / Serilog.Sinks.Oracle

Sink for Serilog, flushes logs on Oracle
MIT License
17 stars 13 forks source link

Reading serilog configuration from appsettings.json file #5

Open rdemarchis opened 4 years ago

rdemarchis commented 4 years ago

Hi, i'm tring to use the oracle sink with "serilog/serilog-settings-configuration" package, reading the connection configuration from the appsettings file, but it doesn't seem to work. I don't get any error but my oracle table contains no log data. Insted if i use the configuration from code it works fine. This is the configuration section from my appsettings file

"Serilog": { "Using": [ "Serilog.Sinks.Oracle" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Oracle", "Args": { "connectionString": "my oracle connection string", "tableName": "my oracle log table" } } ]

what am i doing wrong?

ddrdoubled commented 4 years ago

Please enable self-logging and check first: https://github.com/serilog/serilog/wiki/Debugging-and-Diagnostics

tomasfil commented 2 years ago

Well the issue is that the package is not setup to use appsettings... It expects only config Action:

2022-10-13T08:12:19.8990225Z Unable to find a method called Oracle for supplied arguments: connectionString, restrictedToMinimumLevel, tableSpaceAndTableName. Candidate methods are:
Oracle(configureFunction, restrictedToMinimumLevel)

I Hate oracle :D