Comments (6)
@mo-esmp yes, I'll try to give it a look asap this weekend 👍
from serilog-ui.
@E4est
Thanks a lot, I'm not sure when I'll be able to take a look at it but I'll try to do it asap, I'll keep you posted 😊
from serilog-ui.
Thanks for reporting this.
@followynne we forgot log lever Critical. Do you have time to fix this?
from serilog-ui.
Hello,
I came back from my vacation and just had the chance to test it.
Now I'm realizing that my initial issue was described poorly.
On 2.1.2 it still looks like this:
but apparently there is a white text in a white box saying "Fatal".
It seems like Serilog saves critical logs as "Fatal".
(I'm using the MsSqlServerProvider, if that's relevant.)
from serilog-ui.
Hey @E4est
Thanks for reporting back.
Can you please attach the sample log you're using in the screenshot? (json, text, as you prefer...)
I'll use it to test more in depth the feat. 😊
from serilog-ui.
Sure :)
// The JSON payload for the screenshot.
{
"level": "critical",
"messageTemplate": "I hope critical works now. {Remark}",
"properties": [
"That would be so cool."
]
}
// The model posted to the log API.
public class LogModel
{
public string? MessageTemplate { get; set; }
public string? Level { get; set; }
public ICollection<object> Properties { get; set; } = new List<object>();
}
// The API controller receiving logs.
[Route("")]
[ApiController]
public class LoggerController : ControllerBase
{
private readonly ILogger _logger;
public LoggerController(ILogger<LoggerController> logger)
{
_logger = logger;
}
[HttpPost("")]
public IActionResult Insert(LogModel model)
{
switch (model.Level?.ToUpperInvariant())
{
case "CRITICAL":
_logger.LogCritical(model.MessageTemplate, model.Properties.ToArray());
break;
case "DEBUG":
_logger.LogDebug(model.MessageTemplate, model.Properties.ToArray());
break;
case "ERROR":
_logger.LogError(model.MessageTemplate, model.Properties.ToArray());
break;
case "TRACE":
_logger.LogTrace(model.MessageTemplate, model.Properties.ToArray());
break;
case "WARNING":
_logger.LogWarning(model.MessageTemplate, model.Properties.ToArray());
break;
default:
LogInvalidModel(model);
return UnprocessableEntity("invalid level");
}
return NoContent();
}
private void LogInvalidModel(LogModel model)
{
_logger.LogError(
"Invalid log model. Received: '{Request}'.",
JsonConvert.SerializeObject(model));
}
}
from serilog-ui.
Related Issues (20)
- Deployed to developent, UI popup "You are not authorized to access logs" HOT 2
- Error Message column does not exist HOT 4
- BUG: when opening properties for the second time, the tags are escaped twice HOT 2
- Consider RavenDB support
- Any support for ColumnOptions? HOT 3
- Fails to insert data into MariaDB HOT 21
- Support provider name customization HOT 1
- UtcTimeStamp instead of TimeStamp in MongoDbDataProvider HOT 2
- Serilog UI version 3 is live!
- The url in v3 should end with a / else a 404 not found is returned HOT 3
- [feat] Auto-expand dropdowns option when opening 'Additional Columns' modal HOT 3
- Opening exception details tries to parse the field as XML rather than string for MSSQL HOT 10
- Exception occur if RemoveStandardColumn = "Properties" HOT 3
- /api/keys called on Change Token Button
- "Invalid column name 'Properties'." at Serilog UI Home Page, when removeStandardColumns: Properties. HOT 3
- When serilog column options properties are removed it does not fetch logs on UI #487 HOT 4
- Using options.Authorization.AuthenticationType = AuthenticationType.Jwt; in api project HOT 13
- When I am using MongoDb Sink provider Exception and properties column not populating in serilog.Ui HOT 8
- Timestamp returned as Jan 1, 1901 0:00:00.000 HOT 29
- XML output isn't rendered correctly HOT 3
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-ui.