UNPKG

@storm-stack/log-stream

Version:

A package containing a Storm Stack log adapter to write logs to a stream

10 lines (6 loc) 5.47 kB
const a=["K","T","Record",`l'e#"Rb!b"Pde"!N#!w#y`],o=["LogRecord","record","","TextFormatter",'P"w!2"&/#w$y'];export{o as __\u03A9TextFormatter};const n=["date-time-timezone","date-time-tz","date-time","time-timezone","time-tz","time","date","rfc3339","ts","","TextFormatterTimestamp",`P.!.".#.$.%.&.'.(P'2)&/*Jw+y`];export{n as __\u03A9TextFormatterTimestamp};const i=[()=>n,"timestamp",'The timestamp format. This can be one of the following:\n\n- `"date-time-timezone"`: The date and time with the full timezone offset\n(e.g., `"2023-11-14 22:13:20.000 +00:00"`).\n- `"date-time-tz"`: The date and time with the short timezone offset\n(e.g., `"2023-11-14 22:13:20.000 +00"`).\n- `"date-time"`: The date and time without the timezone offset\n(e.g., `"2023-11-14 22:13:20.000"`).\n- `"time-timezone"`: The time with the full timezone offset but without\nthe date (e.g., `"22:13:20.000 +00:00"`).\n- `"time-tz"`: The time with the short timezone offset but without the date\n(e.g., `"22:13:20.000 +00"`).\n- `"time"`: The time without the date or timezone offset\n(e.g., `"22:13:20.000"`).\n- `"date"`: The date without the time or timezone offset\n(e.g., `"2023-11-14"`).\n- `"rfc3339"`: The date and time in RFC 3339 format\n(e.g., `"2023-11-14T22:13:20.000Z"`).\n\nAlternatively, this can be a function that accepts a timestamp and returns a string.\n\nThe default is `"date-time-timezone"`.',"ABBR","FULL","L","abbr","full","l","LogLevel","level","",'The log level format. This can be one of the following:\n\n- `"ABBR"`: The log level abbreviation in uppercase (e.g., `"INF"`).\n- `"FULL"`: The full log level name in uppercase (e.g., `"INFO"`).\n- `"L"`: The first letter of the log level in uppercase (e.g., `"I"`).\n- `"abbr"`: The log level abbreviation in lowercase (e.g., `"inf"`).\n- `"full"`: The full log level name in lowercase (e.g., `"info"`).\n- `"l"`: The first letter of the log level in lowercase (e.g., `"i"`).\n\nAlternatively, this can be a function that accepts a log level and returns a string.','"FULL"',"value","The format of the embedded values.\n\nA function that renders a value to a string. This function is used to render the values in the log record. The default is [`util.inspect()`] in Node.js/Bun and [`Deno.inspect()`] in Deno.\n\n[`util.inspect()`]: https://nodejs.org/api/util.html#utilinspectobject-options\n[`Deno.inspect()`]: https://docs.deno.com/api/deno/~/Deno.inspect","FormattedValues","values","format",`How those formatted parts are concatenated. A function that formats the log record. This function is called with the formatted values and should return a string. Note that the formatted should not* include a newline character at the end. By default, this is a function that formats the log record as follows: \`\`\` 2023-11-14 22:13:20.000 +00:00 [INFO] Hello, world! \`\`\``,"The various options for the built-in text formatters.","TextFormatterOptions",`Pn!4"8?#P.$.%.&.'.(.)P"w*2+&/,J4+8?->.P#2/&/,4/8?0P"w122&/,438?4M?5w6y`];export{i as __\u03A9TextFormatterOptions};const e=["bold","dim","italic","underline","strikethrough","AnsiStyle",'P.!.".#.$.%Jw&y'];export{e as __\u03A9AnsiStyle};const t=["black","red","green","yellow","blue","magenta","cyan","white","AnsiColor",`P.!.".#.$.%.&.'.(Jw)y`];export{t as __\u03A9AnsiColor};const r=[()=>i,"date-time-timezone","date-time-tz","date-time","time-timezone","time-tz","time","date","rfc3339","ts","","timestamp",'The timestamp format. This can be one of the following:\n\n- `"date-time-timezone"`: The date and time with the full timezone offset\n(e.g., `"2023-11-14 22:13:20.000 +00:00"`).\n- `"date-time-tz"`: The date and time with the short timezone offset\n(e.g., `"2023-11-14 22:13:20.000 +00"`).\n- `"date-time"`: The date and time without the timezone offset\n(e.g., `"2023-11-14 22:13:20.000"`).\n- `"time-timezone"`: The time with the full timezone offset but without\nthe date (e.g., `"22:13:20.000 +00:00"`).\n- `"time-tz"`: The time with the short timezone offset but without the date\n(e.g., `"22:13:20.000 +00"`).\n- `"time"`: The time without the date or timezone offset\n(e.g., `"22:13:20.000"`).\n- `"date"`: The date without the time or timezone offset\n(e.g., `"2023-11-14"`).\n- `"rfc3339"`: The date and time in RFC 3339 format\n(e.g., `"2023-11-14T22:13:20.000Z"`).\n\nAlternatively, this can be a function that accepts a timestamp and returns a string.','`"date-time-tz"`.',()=>e,"timestampStyle",'The ANSI style for the timestamp. `"dim"` is used by default.',()=>t,"timestampColor","The ANSI color for the timestamp. No color is used by default.",()=>e,"levelStyle",'The ANSI style for the log level. `"bold"` is used by default.',()=>a,"LogLevel",()=>t,"levelColors",'The ANSI colors for the log levels. The default colors are as follows:\n\n- `"debug"`: `"blue"`\n- `"info"`: `"green"`\n- `"warning"`: `"yellow"`\n- `"error"`: `"red"`\n- `"fatal"`: `"magenta"`',"The various options for the ANSI color formatter.","AnsiColorFormatterOptions",`Pn!P.".#.$.%.&.'.(.)P'2*&/+J4,8?->.Pn/,J408?1Pn2,J438?4Pn5,J468?7"w9Pn:,Jo8#4;8?<M?=w>y`];export{r as __\u03A9AnsiColorFormatterOptions};const s=[()=>o,"formatter","The text formatter to use. Defaults to {@link defaultTextFormatter}.","text","","encode","The text encoder to use. Defaults to an instance of {@link TextEncoder}.","encoder","Options for the {@link getSink} function.","StreamSinkOptions",`Pn!4"8?#PP&2$W/%4&M?'4(8?'M?)w*y`];export{s as __\u03A9StreamSinkOptions};