Comments (8)
I have created a test dotnet core web application with Serilog.Sinks.AzureDocumentDB sink configured and deployed as Azure App Service. It's been running for few hours and I haven't noticed any issue with logging.
Please keep in mind that new sink requires dotnet core version 1.1.0+. I'm closing this issue. However, if you still have issue with sink, feel free to leave a message.
from serilog-sinks-azuredocumentdb.
Thanks for the report - sounds like some investigation is needed. Let us know if you need help making sense of what's going on in there π
from serilog-sinks-azuredocumentdb.
@buzallen, Thanks for reporting issue. I'll investigate what's going on. However, this sink is using preview
version of Microsoft Azure DocumentDB driver so bugs are expected and may not be used for production. Please see https://www.nuget.org/packages/Microsoft.Azure.DocumentDB.Core/
from serilog-sinks-azuredocumentdb.
Thanks @saleem-mirza , that's a good point. I'm testing sinks for now but I'll keep that in mind when it's time to move forward.
from serilog-sinks-azuredocumentdb.
Saleem, you're a powerhouse :-) kudos for all of your work on this sink!
from serilog-sinks-azuredocumentdb.
Thanks @saleem-mirza. Interesting I still have the issue on my end. I'll have to investigate if something is configured incorrectly on my end. I get about 5 minutes of logs to the document db and then it stops writing anything. I'll re-post here if I discover anything. Thanks again.
from serilog-sinks-azuredocumentdb.
@buzallen my project.json
, Startup.cs
and Controller
looks like as
Note: I removed unrelated stuff for sake of brevity
project.json
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.1.0",
"type": "platform"
},
"Serilog": "2.3.0",
"Serilog.Sinks.AzureDocumentDb": "3.5.17"
},
"frameworks": {
"netcoreapp1.6": {
"imports": [
"dotnet5.6",
"dnxcore50",
"portable-net45+win8"
]
}
}
}
Startup.cs (ConfigureServices)
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlite(Configuration.GetConnectionString("DefaultConnection")));
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
services.AddMvc();
services.AddSingleton<Serilog.ILogger>(
new Serilog.LoggerConfiguration()
.WriteTo.AzureDocumentDB(
"https://xxxxx.documents.azure.com:443/",
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
)
.MinimumLevel.Verbose()
.CreateLogger());
}
HomeController.cs
public class HomeController : Controller
{
Serilog.ILogger _logger;
public HomeController(Serilog.ILogger logger)
{
_logger = logger;
_logger.Information("HomeController constructor called.");
}
...
Hopefully, it will shed some light.
from serilog-sinks-azuredocumentdb.
Thanks again @saleem-mirza . Switching to your implementation does work. For reasons I'm unsure of when I set it up like I do in my original post above is when it stops logging.
from serilog-sinks-azuredocumentdb.
Related Issues (20)
- Dictionary<,> Not Serializing properly HOT 3
- Logging works only for the first time and stops there after HOT 9
- NullReferenceException in LogEventExtensions.ConvertToDictionary HOT 10
- Error log event not saving data in DocumentDB HOT 2
- Sink does not work with Microsoft.Azure.DocumentDB 1.15.0 HOT 7
- Question: Is there retry logic if Azure Doc db is unreachable for any reason HOT 2
- Actor thread blocking at Serilog.Sinks.Batch.BatchProvider.EventPump HOT 1
- Getting βThe module was expected to contain an assembly manifest.β when configuring Serilog logging in my API project HOT 7
- .csdef file gives error when i specify <Setting name="serilog:write-to:AzureDocumentDB.endpointUrl" /> HOT 4
- Upgrading from 3.8.0 to 3.8.1 destroys production server CPU (~400% increase) HOT 10
- Serilog 3.7.0 onwards doesn't support .NETStandard anymore HOT 3
- Allow the Ability to Define a Partition Key For the Container
- Upgrade to newer version of Cosmos SDK
- Cannot write to Cosmos DB HOT 2
- Nothing logged written to database HOT 1
- a suggestion about intro documentation HOT 1
- Sometimes logs are note written to the CosmosDb
- Logs are not getting written into User Created Cosmos DB / Container
- A new organization for this repository
- Serilog to Cosmos DB - Not saving timestamp to ISO 8601 UTC standard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serilog-sinks-azuredocumentdb.