Summary#
Two things live here: what your app says at run time, and what the compiler says at build time.
entity Order {
[Required, MaxLength(40)] string Code;
bool Shipped;
}
void ShipOrder(Order order) {
Log.Information("Order {OrderCode} shipped", order.Code);
order.Shipped = true;
}Description#
Log.* is dual-sided and always available — no dependency to declare. Called from a page it reaches the
browser console and the app's own log, under one correlation id that spans the client call and the server work it
caused, which is what makes osy logs --tail the first move when a page misbehaves. Both the template form and an
interpolated string capture searchable fields; the interpolated form is decomposed, not flattened. See
Log.*.
A warning you have decided about is silenced where you decided it — [SuppressWarning] — not by turning the rule off globally. A suppression names the rule and sits at the site, so the next reader sees the decision rather than an absence.
For what a run actually did, rather than what it said, the local area has the tools: Seeing what happened when your code ran opens a trace and jumps to the fault, and faults are captured even with tracing off.
See also#
- Log.* — the one logging call, and why it is dual-sided
- [SuppressWarning] — silencing one rule at one site
- Seeing what happened when your code ran — when the log is not enough and you want the run