Skip to content

how to log tracing::error with a custom message #865

Closed
@evbo

Description

@evbo

I only receive the following non-descript error logs, despite calling tracing::error! with more specifics:

{
    "time": "2024-04-26T23:09:32.311Z",
    "type": "platform.initRuntimeDone",
    "record": {
        "initializationType": "on-demand",
        "phase": "init",
        "status": "error",
        "errorType": "Runtime.ExitError"
    }
}

Example of how I call tracing:

let err_info = format!("Something very very bad happened");
tracing::error!(name: "invalid_input", "Invalid input: {}", err_info);

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