L
L
lucky42021-04-09 08:09:42
JavaScript
lucky4, 2021-04-09 08:09:42

How to format a Serilog file?

How can I format the data that is written to Serilog?
Now the data that came from Serilog is recorded as text.txt.
606fe11e0a894065813816.png

How can I make a template for a post or something like that?

"Serilog": {
    "MinimumLevel": {
      "Default": "Debug",
      "Override": {
        "Microsoft": "Information",
        "System": "Information"
      }
    },
    "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ],
    "WriteTo": [
      {
        "Name": "File",
        "Args": {
          "path": "logs/log_.txt",
          "rollingInterval": "Day"
        }
      }
    ]
  },

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Spirin, 2018-06-04
@rockon404

Nothing strange. You are importing a module from source that uses another module. It is correct in such cases to build with webpack + babel or browserify .
In the assembly of the library on the official website, there are collected themes that can be imported to the page. Get the theme file from there.

V
Vasily Bannikov, 2021-04-09
@lucky4

Yes. There is a sink for writing json, instead of bare text.
UPD: not a sink, but a formatter.
https://github.com/serilog/serilog-formatting-compact

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question