···66666767These are the loggers that should be used for the majority of your application. They accept an optional configuration object for configuring log destinations.
68686969-* `loggerApp` - Logs to console and a fixed file destination
7070-* `loggerAppRolling` - Logs to console and a rolling file destination
6969+* [`loggerApp`](https://foxxmd.github.io/logging/functions/index.loggerApp.html) - Logs to console and a fixed file destination
7070+* [`loggerAppRolling`](https://foxxmd.github.io/logging/functions/index.loggerAppRolling.html) - Logs to console and a rolling file destination
71717272### Helper Loggers
73737474These loggers are pre-defined for specific use cases:
75757676-* `loggerDebug` - Logs ONLY to console at minimum `debug` level. Can be used during application startup before a logger app configuration has been parsed.
7777-* `loggerTest` - A noop logger (will not log anywhere) for use in tests/mockups.
7676+* [`loggerDebug`](https://foxxmd.github.io/logging/variables/index.loggerDebug.html) - Logs ONLY to console at minimum `debug` level. Can be used during application startup before a logger app configuration has been parsed.
7777+* [`loggerTest`](https://foxxmd.github.io/logging/variables/index.loggerTest.html) - A noop logger (will not log anywhere) for use in tests/mockups.
78787979## Configuring
80808181-The [App Loggers](#app-loggers) take an optional config object.
8181+The [App Loggers](#app-loggers) take an optional config object [`LogOptions`](https://foxxmd.github.io/logging/interfaces/index.LogOptions.html):
82828383```ts
8484interface LogOptions {
···100100 file?: LogLevel | false | FileLogOptions
101101}
102102```
103103-Available `LogLevel` levels, from lowest to highest:
103103+Available [`LogLevel`](https://foxxmd.github.io/logging/types/index.LogLevel.html) levels, from lowest to highest:
104104105105* `debug`
106106* `verbose`
···124124125125### File Options
126126127127-`file` in `LogOptions` may be an object that specifies more behavior log files.
127127+[`file` in `LogOptions`](https://foxxmd.github.io/logging/interfaces/index.FileLogOptions.html) may be an object that specifies more behavior log files.
128128129129<details>
130130···154154 * This determines the format of the datetime inserted into the log file name:
155155 *
156156 * * `unix` - unix epoch timestamp in milliseconds
157157- * * `iso` - Full ISO8601 datetime IE '2024-03-07T20:11:34Z'
157157+ * * `iso` - Full ISO8601 datetime IE '2024-03-07T20:11:34-00:00'
158158 * * `auto`
159159 * * When frequency is `daily` only inserts date IE YYYY-MM-DD
160160 * * Otherwise inserts full ISO8601 datetime
···208208209209```ts
210210import { loggerApp } from '@foxxmd/logging';
211211-import {
211211+import {
212212 PRETTY_ISO8601, // replaces standard timestamp with ISO8601 format
213213- buildDestinationFile
213213+ buildDestinationFile
214214} from "@foxxmd/logging/factory";
215215216216const warnFileDestination = buildDestinationFile('warn', {path: './myLogs/warn.log'});
···231231232232### Child Loggers
233233234234-[Pino Child loggers](https://getpino.io/#/docs/child-loggers) can be created using the `childLogger` function with the added ability to inherit **Labels** from their parent loggers.
234234+[Pino Child loggers](https://getpino.io/#/docs/child-loggers) can be created using the [`childLogger`](https://foxxmd.github.io/logging/functions/index.childLogger.html) function with the added ability to inherit **Labels** from their parent loggers.
235235236236**Labels** are inserted between the log level and message contents of a log. The child logger inherits **all** labels from **all** its parent loggers.
237237···301301302302# Building A Logger
303303304304-All the functionality required to build your own logger is exported by `@foxxmd/logging/factory`. You can customize almost every facet of logging.
304304+All the functionality required to build your own logger is exported by [`@foxxmd/logging/factory`](https://foxxmd.github.io/logging/modules/factory.html). You can customize almost every facet of logging.
305305306306-A logger is composed of a minimum default level and array of objects that implement `StreamEntry`, the same interface used by [`pino.multistream`](https://getpino.io/#/docs/api?id=pino-multistream). The only constraint is that your streams must accept the same levels as `@foxxmd/logging` using the `LogLevelStreamEntry` interface that extends `StreamEntry`.
306306+A logger is composed of a minimum default level and array of objects that implement [`StreamEntry`](https://foxxmd.github.io/logging/interfaces/index._internal_.StreamEntry-1.html), the same interface used by [`pino.multistream`](https://getpino.io/#/docs/api?id=pino-multistream). The only constraint is that your streams must accept the same levels as `@foxxmd/logging` using the [`LogLevelStreamEntry`](https://foxxmd.github.io/logging/types/index.LogLevelStreamEntry.html) interface that extends `StreamEntry`.
307307308308```ts
309309import {LogLevelStreamEntry} from '@foxxmd/logging';
···332332All `buildDestination` functions take args:
333333334334* `level` (first arg) - minimum level to log at
335335-* `options` (second arg) - an object extending [`pino-pretty` options](https://github.com/pinojs/pino-pretty?tab=readme-ov-file#options)
335335+* `options` (second arg) - an object extending [`pino-pretty` options](https://github.com/pinojs/pino-pretty?tab=readme-ov-file#options), [`PrettyOptions`](https://foxxmd.github.io/logging/interfaces/factory._internal_.PrettyOptions_.html)
336336337337-`options` inherits a default `pino-pretty` configuration that comprises `@foxxmd/logging`'s opinionated logging format. The common default config can be generated using `prettyOptsFactory` which accepts an optional [`pino-pretty` options](https://github.com/pinojs/pino-pretty?tab=readme-ov-file#options) object to override defaults:
337337+`options` inherits a default `pino-pretty` configuration that comprises `@foxxmd/logging`'s opinionated logging format. The common default config can be generated using [`prettyOptsFactory`](https://foxxmd.github.io/logging/functions/factory.prettyOptsFactory.html) which accepts an optional `PrettyOptions` object to override defaults:
338338339339```ts
340340import { prettyOptsFactory } from "@foxxmd/logging/factory";
···356356357357Specific buildDestinations also require passing a stream or path:
358358359359-`buildDestinationStream` must pass a `NodeJS.WriteableStream` or SonicBoom `DestinationStream` to options as `destination`
359359+[`buildDestinationStream`](https://foxxmd.github.io/logging/functions/factory.buildDestinationStream.html) must pass a `NodeJS.WriteableStream` or SonicBoom `DestinationStream` to options as [`destination`](https://foxxmd.github.io/logging/types/factory.StreamDestination.html)
360360361361```ts
362362import {buildDestinationStream} from "@foxxmd/logging/factory";
···365365const dest = buildDestinationStream('debug', {destination: myStream});
366366```
367367368368-`buildDestinationStdout` and `buildDestinationStderr` do not require a destination as they are fixed to STDOUT/STDERR
368368+[`buildDestinationStdout`](https://foxxmd.github.io/logging/functions/factory.buildDestinationStdout.html) and [`buildDestinationStderr`](https://foxxmd.github.io/logging/functions/factory.buildDestinationStderr.html) do not require a destination as they are fixed to STDOUT/STDERR
369369370370-`buildDestinationFile` and `buildDestinationRollingFile` must pass a `path` to options
370370+[`buildDestinationFile`](https://foxxmd.github.io/logging/functions/factory.buildDestinationFile.html) and [`buildDestinationRollingFile`](https://foxxmd.github.io/logging/functions/factory.buildDestinationRollingFile.html) must pass a [`path`](https://foxxmd.github.io/logging/types/factory.FileDestination.html) to options
371371372372```ts
373373import {buildDestinationFile} from "@foxxmd/logging/factory";
···414414415415### Parsing LogOptions
416416417417-If you wish to use [`LogOptions`](#configuring) to get default log levels for your destinations use `parseLogOptions`:
417417+If you wish to use [`LogOptions`](#configuring) to get default log levels for your destinations use [`parseLogOptions`](https://foxxmd.github.io/logging/functions/index.parseLogOptions.html):
418418419419```ts
420420import {parseLogOptions, LogOptions} from '@foxxmd/logging';