Skip to content

String arguments are not colorized when using a custom ExpressionTemplate #56

Closed
@oising

Description

@oising

I noticed that when using a custom ExpressionTemplate, my placeholders in log messages are no longer colorized. Is this a bug? e.g. Log.Information("foo {bar}", "bar") won't color the "bar" anymore.

I suspect it's only a problem with string arguments.

My template:

var template = new ExpressionTemplate(
                "[{@l:u3}] {Coalesce(Substring(SourceContext, LastIndexOf(SourceContext, '.') + 1),'Core')} " +
                "<{ThreadId}> {@m}\n{@x}", theme: TemplateTheme.Code);

Without ExpressionTemplate:

image

With ExpressionTemplate:

image

I'm not sure if this a problem in expressions, or in the console sink.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions