UNPKG
med-log
Version:
latest (0.2.3)
0.2.3
0.2.2
0.2.1
0.2.0
0.1.13
0.1.11
0.1.1
0.1.0
Logging package intended for gxp/samd regulated environments hosted in the cloud
med-log
/
lib
/
logLevel.ts
12 lines
(10 loc)
•
244 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
const
LOGLEVEL_MAX
=
5
;
export
enum
LogLevel
{
INFO
=
"INFO"
,
WARN
=
"WARN"
,
ERROR
=
"ERROR"
};
export
function
getLogLevelString
(
str
:
string
) { str =
"["
+ str +
"]"
;
return
`
${str.padEnd(LOGLEVEL_MAX +
2
)}
`
; }