|
| 1 | +# Placeholders |
| 2 | + |
| 3 | +This is the list of placeholders and aliases that will get replaced in your logging messages and prefix. |
| 4 | + |
| 5 | +## Placeholders |
| 6 | + |
| 7 | +### Caller |
| 8 | + |
| 9 | +| Name | Value | |
| 10 | +|---------------------------|------------------------------------------------------------| |
| 11 | +| `${caller:function}` | The name of the function and file where it has been logged | |
| 12 | +| `${caller:shortfunction}` | The name of the function where it has been logged | |
| 13 | +| `${caller:file}` | The name of the file where it has been logged | |
| 14 | +| `${caller:line}` | The line in the file where it has been logged | |
| 15 | + |
| 16 | +### Logging Level |
| 17 | + |
| 18 | +| Name | Value | |
| 19 | +|---------------------------|------------------------------------------------------------| |
| 20 | +| `${level:color}` | The color representing the logging level | |
| 21 | +| `${level:name}` | The name representing the logging level | |
| 22 | +| `${level:shortname}` | The short name representing the logging level | |
| 23 | + |
| 24 | +### Date & Time Now |
| 25 | + |
| 26 | +| Name | Value | |
| 27 | +|---------------------------|-----------------------------------------------------------------| |
| 28 | +| `${now:date}` | The current date, default format is `Jan 02, 2006` | |
| 29 | +| `${now:time}` | The current time, default format is `15:04:05` | |
| 30 | +| `${now:datetime}` | The current datetime, default format is `Jan 02, 2006 15:04:05` | |
| 31 | + |
| 32 | +### System |
| 33 | + |
| 34 | +| Name | Value | |
| 35 | +|---------------------------|------------------------------------------------------------| |
| 36 | +| `${sys:architecture}` | The runtime architecture of the system | |
| 37 | +| `${sys:hostname}` | The hostname of the system | |
| 38 | +| `${sys:operating_system}` | The runtime operating system | |
| 39 | +| `${sys:username}` | The username of the system | |
| 40 | +| `${sys:groupid}` | The group ID of the current user | |
| 41 | +| `${sys:userid}` | The user ID of the current user | |
| 42 | + |
| 43 | +### Foreground Colors |
| 44 | + |
| 45 | +| Name | Value | |
| 46 | +|----------------------|------------------------------------| |
| 47 | +| `${fg:black}` | The black foreground color | |
| 48 | +| `${fg:red}` | The red foreground color | |
| 49 | +| `${fg:green}` | The green foreground color | |
| 50 | +| `${fg:yellow}` | The yellow foreground color | |
| 51 | +| `${fg:blue}` | The blue foreground color | |
| 52 | +| `${fg:purple}` | The purple foreground color | |
| 53 | +| `${fg:cyan}` | The cyan foreground color | |
| 54 | +| `${fg:white}` | The white foreground color | |
| 55 | +| `${fg:gray}` | The gray foreground color | |
| 56 | +| `${fg:brightred}` | The bright red foreground color | |
| 57 | +| `${fg:brightgreen}` | The bright green foreground color | |
| 58 | +| `${fg:brightyellow}` | The bright yellow foreground color | |
| 59 | +| `${fg:brightblue}` | The bright blue foreground color | |
| 60 | +| `${fg:brightpurple}` | The bright purple foreground color | |
| 61 | +| `${fg:brightcyan}` | The bright cyan foreground color | |
| 62 | +| `${fg:brightwhite}` | The bright white foreground color | |
| 63 | + |
| 64 | +### Background Colors |
| 65 | + |
| 66 | +| Name | Value | |
| 67 | +|----------------------|------------------------------------| |
| 68 | +| `${bg:black}` | The black background color | |
| 69 | +| `${bg:red}` | The red background color | |
| 70 | +| `${bg:green}` | The green background color | |
| 71 | +| `${bg:yellow}` | The yellow background color | |
| 72 | +| `${bg:blue}` | The blue background color | |
| 73 | +| `${bg:purple}` | The purple background color | |
| 74 | +| `${bg:cyan}` | The cyan background color | |
| 75 | +| `${bg:white}` | The white background color | |
| 76 | +| `${bg:gray}` | The gray background color | |
| 77 | +| `${bg:brightred}` | The bright red background color | |
| 78 | +| `${bg:brightgreen}` | The bright green background color | |
| 79 | +| `${bg:brightyellow}` | The bright yellow background color | |
| 80 | +| `${bg:brightblue}` | The bright blue background color | |
| 81 | +| `${bg:brightpurple}` | The bright purple background color | |
| 82 | +| `${bg:brightcyan}` | The bright cyan background color | |
| 83 | +| `${bg:brightwhite}` | The bright white background color | |
| 84 | + |
| 85 | +### Special Effects |
| 86 | + |
| 87 | +| Name | Value | |
| 88 | +|---------------------------|------------------------------------------------------------| |
| 89 | +| `${effect:bold}` | The bold effect | |
| 90 | +| `${effect:dim}` | The dim effect | |
| 91 | +| `${effect:underline}` | The underline effect | |
| 92 | +| `${effect:blink}` | The blink effect | |
| 93 | +| `${effect:inverse}` | The inverse effect | |
| 94 | +| `${effect:strikethrough}` | The strikethrough effect | |
| 95 | +| `${effect:reset}` | Resets the styles | |
| 96 | + |
| 97 | +## Aliases |
| 98 | + |
| 99 | +### Caller |
| 100 | +| Name | Alias of | |
| 101 | +|--------------------|---------------------------| |
| 102 | +| `${function}` | `${caller:function}` | |
| 103 | +| `${shortfunction}` | `${caller:shortfunction}` | |
| 104 | +| `${file}` | `${caller:file}` | |
| 105 | +| `${line}` | `${caller:line}` | |
| 106 | + |
| 107 | +### Date & Time Now |
| 108 | + |
| 109 | +| Name | Alias of | |
| 110 | +|-----------------------|---------------------------| |
| 111 | +| `${date}` | `${now:date}` | |
| 112 | +| `${time}` | `${now:time}` | |
| 113 | +| `${datetime}` | `${now:datetime}` | |
| 114 | + |
| 115 | +### System |
| 116 | + |
| 117 | +| Name | Alias of | |
| 118 | +|-----------------------|---------------------------| |
| 119 | +| `${sys:arch}` | `${sys:architecture}` | |
| 120 | +| `${architecture}` | `${sys:architecture}` | |
| 121 | +| `${arch}` | `${sys:architecture}` | |
| 122 | +| `${sys:os}` | `${sys:operating_system}` | |
| 123 | +| `${operating_system}` | `${sys:operating_system}` | |
| 124 | +| `${os}` | `${sys:operating_system}` | |
| 125 | +| `${hostname}` | `${sys:hostname}` | |
| 126 | +| `${username}` | `${sys:username}` | |
| 127 | +| `${groupid}` | `${sys:groupid}` | |
| 128 | +| `${userid}` | `${sys:userid}` | |
| 129 | + |
| 130 | +### Foreground Colors |
| 131 | + |
| 132 | +| Name | Alias of | |
| 133 | +|-----------------------|---------------------------| |
| 134 | +| `${black}` | `${fg:black}` | |
| 135 | +| `${red}` | `${fg:red}` | |
| 136 | +| `${green}` | `${fg:green}` | |
| 137 | +| `${yellow}` | `${fg:yellow}` | |
| 138 | +| `${blue}` | `${fg:blue}` | |
| 139 | +| `${purple}` | `${fg:purple}` | |
| 140 | +| `${cyan}` | `${fg:cyan}` | |
| 141 | +| `${white}` | `${fg:white}` | |
| 142 | +| `${gray}` | `${fg:gray}` | |
| 143 | +| `${brightred}` | `${fg:brightred}` | |
| 144 | +| `${brightgreen}` | `${fg:brightgreen}` | |
| 145 | +| `${brightyellow}` | `${fg:brightyellow}` | |
| 146 | +| `${brightblue}` | `${fg:brightblue}` | |
| 147 | +| `${brightpurple}` | `${fg:brightpurple}` | |
| 148 | +| `${brightcyan}` | `${fg:brightcyan}` | |
| 149 | +| `${brightwhite}` | `${fg:brightwhite}` | |
| 150 | + |
| 151 | +### Background Colors |
| 152 | + |
| 153 | +| Name | Alias of | |
| 154 | +|-----------------------|---------------------------| |
| 155 | +| `${bblack}` | `${bg:black}` | |
| 156 | +| `${bred}` | `${bg:red}` | |
| 157 | +| `${bgreen}` | `${bg:green}` | |
| 158 | +| `${byellow}` | `${bg:yellow}` | |
| 159 | +| `${bblue}` | `${bg:blue}` | |
| 160 | +| `${bpurple}` | `${bg:purple}` | |
| 161 | +| `${bcyan}` | `${bg:cyan}` | |
| 162 | +| `${bwhite}` | `${bg:white}` | |
| 163 | +| `${bgray}` | `${bg:gray}` | |
| 164 | +| `${bbrightred}` | `${bg:brightred}` | |
| 165 | +| `${bbrightgreen}` | `${bg:brightgreen}` | |
| 166 | +| `${bbrightyellow}` | `${bg:brightyellow}` | |
| 167 | +| `${bbrightblue}` | `${bg:brightblue}` | |
| 168 | +| `${bbrightpurple}` | `${bg:brightpurple}` | |
| 169 | +| `${bbrightcyan}` | `${bg:brightcyan}` | |
| 170 | +| `${bbrightwhite}` | `${bg:brightwhite}` | |
| 171 | + |
| 172 | +### Special Effects |
| 173 | + |
| 174 | +| Name | Alias of | |
| 175 | +|-----------------------|---------------------------| |
| 176 | +| `${bold}` | `${effect:bold}` | |
| 177 | +| `${dim}` | `${effect:dim}` | |
| 178 | +| `${underline}` | `${effect:underline}` | |
| 179 | +| `${blink}` | `${effect:blink}` | |
| 180 | +| `${inverse}` | `${effect:inverse}` | |
| 181 | +| `${strikethrough}` | `${effect:strikethrough}` | |
| 182 | +| `${reset}` | `${effect:reset}` | |
0 commit comments