Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Latest commit

 

History

History

pretty

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

pretty function

pretty() will marshal the data to JSON and then log it at the INFO level. The default indention setting is 2 spaces and if set to 0, it will print on a single line.

configuration

pretty({"spaces": 2})

example

message in

{
    "_id": 0,
    "name": "transporter",
    "type": "function"
}

config

pretty({"spaces":0})

log line

INFO[0000]
{"_id":0,"name":"transporter","type":"function"}

config

pretty({"spaces":2})

log line

INFO[0000]
{
  "_id":0,
  "name":"transporter",
  "type":"function"
}