diff --git a/assets/highlight.css b/assets/highlight.css index 9010506..12a0168 100644 --- a/assets/highlight.css +++ b/assets/highlight.css @@ -17,8 +17,12 @@ --dark-hl-7: #6A9955; --light-hl-8: #267F99; --dark-hl-8: #4EC9B0; - --light-hl-9: #CD3131; - --dark-hl-9: #F44747; + --light-hl-9: #098658; + --dark-hl-9: #B5CEA8; + --light-hl-10: #000000; + --dark-hl-10: #C8C8C8; + --light-hl-11: #000000FF; + --dark-hl-11: #D4D4D4; --light-code-background: #FFFFFF; --dark-code-background: #1E1E1E; } @@ -34,6 +38,8 @@ --hl-7: var(--light-hl-7); --hl-8: var(--light-hl-8); --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); --code-background: var(--light-code-background); } } @@ -48,6 +54,8 @@ --hl-7: var(--dark-hl-7); --hl-8: var(--dark-hl-8); --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); --code-background: var(--dark-code-background); } } @@ -62,6 +70,8 @@ --hl-7: var(--light-hl-7); --hl-8: var(--light-hl-8); --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); --code-background: var(--light-code-background); } @@ -76,6 +86,8 @@ --hl-7: var(--dark-hl-7); --hl-8: var(--dark-hl-8); --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); --code-background: var(--dark-code-background); } @@ -89,4 +101,6 @@ .hl-7 { color: var(--hl-7); } .hl-8 { color: var(--hl-8); } .hl-9 { color: var(--hl-9); } +.hl-10 { color: var(--hl-10); } +.hl-11 { color: var(--hl-11); } pre, code { background: var(--code-background); } diff --git a/assets/navigation.js b/assets/navigation.js index 5c5b3fa..f49c184 100644 --- a/assets/navigation.js +++ b/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA5WUS2+DMBCE/4vPqA/SpCq3KI9ekCI1VS9RVDmwIVYd2zJLlKjKf68CNJiXgSs7/oYdBm9+CcIZiUf2NECpL8QhiuKBeOQow4RD/JgPHg545MQhP0yExHMdEhwYDzUI4m3ukF3CeDiHGJmgyKT4kJwzES0ZhwK8T0RwGxZoy7Gy7eTl6rSaDXUZiF+jBnocYpCdGGQRygSHWdxODLMArQdagNZdFr6MIujmZjILTGlAvKwUxstqIevImrgTPJMilmZNTlQzujN7XhKWgSO3BiyXro1Wr9rIvW4NGBMhnOv/Xvq415+nqI7Bl9FKpRE1pZbBKkJLYqlN+3fNcIbIguKp4BNibMoqIxUaS+iZaA67JOoipaJO1FSp9uXuks7Vpkrll1YPWq60QH0Z+XACXsDwou77/U8rxXh6e30emxv6q/dvf/G18NftWRUaS1RNvWICQe9pYL5VY6fc8cQsetynpKbKHlOpnJWQap1siCiPMruqFwLNC6cpc0PYgz2nSFt5t2EzY3vd/gGrUA2rmQcAAA==" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA7VZbW/bNhD+L9pXp6vdJFuDoUDql2GoPQ92saIoAoOWzjIRmtRIKrA39L8PkiybEkWJItOv1nPPc0cej8fzt/8CCUcZPAQ7FErGT8EgSJDcBw/BgUUpAfHz+cObvTyQYBA8YxoFD6NBEO4xiTjQ4OHbhWSbYhJNQEhMkcSMrhghmMYzTOBKvEtpmH28UreYVWXvb78PjGJ9VXrSryUHdOgjUFj0kohYKvtJZBb9JIDznhLAeZfEnMUxdPMWsBayhIOUp2UixayekDqlBu4kHjMqmJomL4hjtFXzvAKsEr4baYTVpDOx6alWoco+Kyt+5ZOnROGqwWon8u37X4Z3KmuRfha8GrCL+TdMJXCKyAdzudiUmI1V5fiY7nbApzRkEaaxyVOFtGrQ6PEgCAkSImMR0Q0WN3AsrAMlli8cy2zL6sc7V9qhsFm9alVTv7u3Uh4zwrhFpDnOPcDcHKQE29guBm5hzVk8ARFynEir8Cp49zD/KmtBViE2trFWrdwCzjnwDoNNtFewZ6g5x/QoORK9ZAsTd/E5vABx8KDRzt2NBQiBYpgxfkByltLQwgXNxl2+pS9oT7iO9sA653D4bLPtOHx2D3J6DEkagYXOGekutTxgaaGTwfqKPH1/UoQwjeCo31r5z1YXVYK4gDmLzzWjqT0pyGrAltYklzE3UAWdAmqhIjngMwjZ1JQUTFdMS0tSgCawTeMuphzUSfWYJObgLpDO0B6T5Pw6sGA7I1tI5yzOC1M99wqi8mtXPzRf/r6ZT/+eztfmtbpiWpaqKa+UenLxqjGnRnf3aqILmyRVUe3LFOvX28UdLScblui8lEXRm1KpdvZNa64ALbgnSCIjX/bRp6UtiHo2tI/iRMMVCJbyELo3VWFvsnS7JSpMV/HcslO5Kjkc/Wp3Z7wAldMDlhJ4r6gbDN2C3vzJIsjZPiMeg7STr1s5ak+Wi/7SVSM35bVEEofOq280d/NGJbLIOxXun3YWB1iF3wyrkrdmweaT7q/9U43i7Mjw/e27ty3uqCd9y3j+IO1/2G6Gby7W/ru9gh1woCGmsaH69PDLhtjfZfdK3eLu6xVxI2vPg9XmYJ9D91T3bYGS5qu37sgCJe4vhAnsUEqktWIN7y78SE+rSj9tEDzjPIR4rD2kdRUee7yaP4Gh61IUPkFzw2UrMLJRGHkMILCQQE3dqDpxOAM9RmeIkDU2TM40vRLtOA1MhWSHvPVt67ZVvbqFx/ObjrOLLYtgi/TJgiZdw7sLc4hQKHsV3YqJ84gy1kdXbaKqhZvmR5RPAyob26Z4xTvqYZoNxrsrSgn0HAl2H0fjS9peZMnXkjf8P9AsVqI9Rb9guV9jArT7DqjhX024X9y6nbsja+AYEfwv8Jn2/5H+ilDAnrGP94jGxYPMvuAbDD1csavEvuXXbprc0OK8yiy5cSTT/lg0jWZs62+2UQuUJJWUbq2/ioVzzVczuKPYa/lre4tfp7S9LjXdzmNl7Q5K/d37w86Fj9DrrafmxQ/KG1cdn1PoqjnlnPHsthijVFi9JysGbqOaPyRwJBn/ioFEKxApsZyTNRi6hV0SrUCmnLq4oFr6+lBVN5ykKtzjjZm9+kuyHuPo0sRjDp1TbAm4qiumrv/TswMWMMfPlg86xcBNcQX/pJhD1Lm9JdB9Y1cQMm4jlMFc/kJ9+h+WiSSeKygAAA==" \ No newline at end of file diff --git a/assets/search.js b/assets/search.js index 281af25..1cc1cdf 100644 --- a/assets/search.js +++ b/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA61Y246jOBD9l5pXK5NyyI231XbPaqSWerUzmhcUtejgpNESQOD0bivKv4+MCZSJTULSjwnnYuq4CswBiuy/EvzgAP/GaQQ+Z5CGOwE+xGkk/gcG+yIBH3ZZtE9E+bX6d/QmdwkwWCdhWYoSfIAjO1fYhGuZFR9nGvX//Srj5RynrdZTtt2KopGSH3mzGH3JosYgDwuRyuZmeuWfxLtIfshChLvHVJJld7y6uIHG0xk1fc5lnKVl4xWnUhSbcE0Na8wwHxxzrzFK1JKv9vhygvc4EY7LdBMn4nrPGn2/5d+hfBtmWzPus15naZkNueGWMNjYsnkfQhm6Nqy69jnd0dsSwywmRP35r5enx1+PTz8a/fewiMPXdt60kGEuM9ID1ZT4I88bk80+XVelrU0axP0e/2RJEqfby1Y18ObaaaEH8brfOotHMHf6/BSlvGCjIDfXb/0WJ1Fn0ndLRzA3++RhUQrL9O16dXA3+8XlFWYUdHNOeSGk/PizM4zaqE6PXgPX73Z6ivf4fYuvMFOgoU40s0rkOZflt85rRVtI05Bg7/B93cdJ9CBKGaehctFP/h5zO+FTVxBlezloBYrwuSsQha1Fe1Ygigv9OmgFxo677H/n3uvK1VN74CII6961OGek4X3NlGy8VqyeK/4B3kVRxlkKPvDRZLQEBptYJJE6J+hlMFhnu51SWNXXfgmloxAa8nUMLBgzvhzNcLFaseDEqC5Uf1QwBBagDYYGjAMLuA3GDdgEWDCxwSYGzAMWeDaYZ8CmwIKpDTY1YDNgwcwGmxmwObBgboPNDdgCWLCwwRYGbAksWNpgS7O8qtpozQE7QVRJ2KMws0BVc+TM80Yen5tIMw5UZceJFWkmgqryaM0EzVBQFR+tsaCZC6r648zqbkaDKgKcW5FmOqhSwIUVaQaEKgi0RoRmRlwFwa0ZcTMjroLgaHPnnX6pGsaaETcz4ioIbs2ImxlxFQT3rEgzI66C4FMr0syIqyC4NSNuZsRVENyaEdcZVRPsXRRSRN/1JAsCPS6jdgjrc+YBXuphx6enyXoAPgX/cDy2w039UkZdkUJP8jOtGdGaXalV1s9SIuMRGe96meqlgMhMiMzkahn9dkNkOJHhfTJJ/VAi3Dnhzh3c6oX+nIukmOgqZnOIbnmLlrZwsJrvUsSNmLlYnbTJ+lzLU5S8+rrQ0khJXBWpv7y1nHHLGbs4ZZJts9MRg9wYqQe6ClJ/8GlZpClcPZFk25eKZ9rRQroqmWTbqPpe0fKWLW3pZnW3F9ldvaRQnfrJIgkRLzKL01meCJDWQldraYFIH80Jl3Q3urpbc2V13CZUEgv25HIWJ5INhK4ddCLqESD0J9BWg9xyzx1bdiC5X9ftVudsx/4l/YKuhtHnPcswQLKv0LWxNPtsmJOacVfNNDXLZWmZKZz0Arf2wopBHuciiVMBfrA6Hn8DcIkTRI8XAAA="; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA61YXY+rNhD9L+6rlZsZEvKhqtLV3b1VpZW26q3uC4oiNjhZVAIIyLaraP97ZczHmNgEkn0MOWfOeI5nMD6zLPk3Z2vvzP4J44CtkbPYPwq2ZmEciP8YZ6csYmt2TIJTJPIv5dPJa3GMGGe7yM9zkbM1Yx/8MsLe3xVJ9n4Ro3reH2W6WsC8jfWUHA4ia0IV72mTjPrLEI2z1M9EXDSL6Q3/JN5E9KPIhH98jAuSdkerixspPHep6HNahEmcN1phXIhs7++oYIUZpwNTnDVCkUx5sMYvNbxHiXBsovswEsM1K/T9kn/6xes42Ypxn/QuifNkzIJbwmhhw+Z98AvftmHlf5/THb0tMU7CIdGff98+Pf58fPrRxH/zs9B/aedNCxmn4pIeKKfE1zRtRPaneFeWthJpEPdr/JVEURgfrktVwJtrpwI9iJfTwVo8grlT52+RF1dkJOTm+u1ewyjoTPpu6QjmZp3Uz3JhmL5drQ7uZr0wHyBGQTf7lGaiKN6/dYZRa1X96tVw/Wr1W7xH73s4QEyCxipRz8ogz2mRf+8cK9pC6oIEe4fuyymMggeRF2HsSxX15u8RNxM+NYMgORWjMpCEz81AZKYW7clAZFf6dVQG2o67rn/n3uuGq6b2yCQI695crDNS0x4yJS+1ui9/mS9ZRecMUAt2UPeKqqa5LnuBGy3cSP5aHtliP/rN8tGzrQHbkaepIRL1goaKNCvZ8EpwfWZvIstlrdYMJ85kxTjbhyIK5PedSoGzXXI8ygib6r+fQsaRCAX5MmXcm3JnOlnBZsO9mlA+Lx+UKGDcAwMKNBQy7qEBhRrKYdxzDChHQ80Y92YG1ExDzRn35gbUXEO5jHuuAeVqqAXj3sKAWmioJePe0oBaaqgV497KgFrpVZVFBlP1oVP+sv5GA3QHQJYakM/cieO6OlJ3AWS5wTEidSdAlhxMXoBuBsiqg8kO0P0AWXhwjdq6JyCLDwsjUvcFpAGwNCJ1b0CaACZ3QLcHpQlosgd1e1CagGDSxk6HlC1i9Ad1f1CagEZ/UPcHpQs4MyJ1g1DagHMjUncIpQ1odAh1h1DagEaHUHcIpQ1o6h3UDUJpA5oMQt0gR9rgTDnOJ8sp6sNEd8gBO1I5VM7VN5EVIvhDzVfPUy/foH3bqFuLM9tWIxjn9aw/M5yz9fnjox258pcU6gbJ1LngIpZLYrkDY+XVyYyEmZEws+FhyiMmCeOQMM7gMOqsTMIgCYN9YaLqiEO4C8JdWLjl5+ElF0gxwVbM5kqm5S1b2tLCam45iRoRs7E6bpP8bOlJSkBPRKQ0JE+0JhpGIi3vuloiKamtotU9cMuZtpyplaMOMZTmEJ5TEjlzbOUJ8yg5JPUXM6ksWSjYFlrdX7Ys0pW2poySw7bk6XLUSVuuUXIIyuu3lrdqaSs7q7u/iYe9JF9eYpEkCRGuMrP6aooEIL0Ntt5WAQJ100S4ZLyAbbwoblHeHhEqsQV6fLmwE8hOAtsWrIlqBgl1o092I9mM9giGHUjWa1tueW1k2b+k4cDWcer6wjCNgOwrsG0sxb54m5Caoa1mipqkRW4Yakh6AW29oKptm1IkfTSmv+EsDVMRhbFga2/z8fE/Mzpg3KAaAAA="; \ No newline at end of file diff --git a/classes/index._internal_.AsyncResource.html b/classes/index._internal_.AsyncResource.html new file mode 100644 index 0000000..6a78fd9 --- /dev/null +++ b/classes/index._internal_.AsyncResource.html @@ -0,0 +1,48 @@ +AsyncResource | @foxxmd/logging Docs

The class AsyncResource is designed to be extended by the embedder's async +resources. Using this, users can easily trigger the lifetime events of their +own resources.

+

The init hook will trigger when an AsyncResource is instantiated.

+

The following is an overview of the AsyncResource API.

+
import { AsyncResource, executionAsyncId } from 'async_hooks';

// AsyncResource() is meant to be extended. Instantiating a
// new AsyncResource() also triggers init. If triggerAsyncId is omitted then
// async_hook.executionAsyncId() is used.
const asyncResource = new AsyncResource(
type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }
);

// Run a function in the execution context of the resource. This will
// * establish the context of the resource
// * trigger the AsyncHooks before callbacks
// * call the provided function `fn` with the supplied arguments
// * trigger the AsyncHooks after callbacks
// * restore the original execution context
asyncResource.runInAsyncScope(fn, thisArg, ...args);

// Call AsyncHooks destroy callbacks.
asyncResource.emitDestroy();

// Return the unique ID assigned to the AsyncResource instance.
asyncResource.asyncId();

// Return the trigger ID for the AsyncResource instance.
asyncResource.triggerAsyncId(); +
+

Hierarchy (view full)

Constructors

  • AsyncResource() is meant to be extended. Instantiating a +new AsyncResource() also triggers init. If triggerAsyncId is omitted then +async_hook.executionAsyncId() is used.

    +

    Parameters

    • type: string

      The type of async event.

      +
    • Optional triggerAsyncId: number | AsyncResourceOptions

      The ID of the execution context that created + this async event (default: executionAsyncId()), or an + AsyncResourceOptions object (since v9.3.0)

      +

    Returns AsyncResource

Methods

  • Binds the given function to the current execution context.

    +

    The returned function will have an asyncResource property referencing +the AsyncResource to which the function is bound.

    +

    Type Parameters

    • Func extends ((this, ...args) => any)
    • ThisArg

    Parameters

    • fn: Func

      The function to bind to the current execution context.

      +
    • Optional type: string

      An optional name to associate with the underlying AsyncResource.

      +
    • Optional thisArg: ThisArg

    Returns Func & {
        asyncResource: AsyncResource;
    }

    Since

    v14.8.0, v12.19.0

    +
  • Binds the given function to execute to this AsyncResource's scope.

    +

    The returned function will have an asyncResource property referencing +the AsyncResource to which the function is bound.

    +

    Type Parameters

    • Func extends ((...args) => any)

    Parameters

    • fn: Func

      The function to bind to the current AsyncResource.

      +

    Returns Func & {
        asyncResource: AsyncResource;
    }

    Since

    v14.8.0, v12.19.0

    +
  • Call the provided function with the provided arguments in the execution context +of the async resource. This will establish the context, trigger the AsyncHooks +before callbacks, call the function, trigger the AsyncHooks after callbacks, and +then restore the original execution context.

    +

    Type Parameters

    • This
    • Result

    Parameters

    • fn: ((this, ...args) => Result)

      The function to call in the execution context of this async resource.

      +
    • Optional thisArg: This

      The receiver to be used for the function call.

      +
    • Rest ...args: any[]

      Optional arguments to pass to the function.

      +

    Returns Result

    Since

    v9.6.0

    +
  • Call all destroy hooks. This should only ever be called once. An error will +be thrown if it is called more than once. This must be manually called. If +the resource is left to be collected by the GC then the destroy hooks will +never be called.

    +

    Returns this

    A reference to asyncResource.

    +
  • Returns number

    The unique asyncId assigned to the resource.

    +
  • Returns number

    The same triggerAsyncId that is passed to the AsyncResource constructor.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/index._internal_.ErrorWithCause.html b/classes/index._internal_.ErrorWithCause.html new file mode 100644 index 0000000..4a8691f --- /dev/null +++ b/classes/index._internal_.ErrorWithCause.html @@ -0,0 +1,12 @@ +ErrorWithCause | @foxxmd/logging Docs

Type Parameters

  • T = undefined

Hierarchy

  • Error
    • ErrorWithCause

Constructors

  • Type Parameters

    • T = undefined

    Parameters

    • message: string
    • Optional __namedParameters: {
          cause?: T;
      }
      • Optional cause?: T

    Returns ErrorWithCause<T>

Properties

prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

+

Type declaration

    • (err, stackTraces): any
    • Parameters

      Returns any

stackTraceLimit: number
cause: T
name: string
message: string
stack?: string

Methods

  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/index._internal_.EventEmitter-1.EventEmitterAsyncResource.html b/classes/index._internal_.EventEmitter-1.EventEmitterAsyncResource.html new file mode 100644 index 0000000..de05d2a --- /dev/null +++ b/classes/index._internal_.EventEmitter-1.EventEmitterAsyncResource.html @@ -0,0 +1,239 @@ +EventEmitterAsyncResource | @foxxmd/logging Docs

Integrates EventEmitter with AsyncResource for EventEmitters that require +manual async tracking. Specifically, all events emitted by instances of +EventEmitterAsyncResource will run within its async context.

+

The EventEmitterAsyncResource class has the same methods and takes the +same options as EventEmitter and AsyncResource themselves.

+

Throws

if options.name is not provided when instantiated directly.

+

Since

v17.4.0, v16.14.0

+

Hierarchy (view full)

Constructors

Properties

errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' +events. Listeners installed using this symbol are called before the regular +'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an +'error' event is emitted, therefore the process will still crash if no +regular 'error' listener is installed.

+
captureRejectionSymbol: typeof captureRejectionSymbol
captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

+
defaultMaxListeners: number
asyncId: number

The unique asyncId assigned to the resource.

+
triggerAsyncId: number

The same triggerAsyncId that is passed to the AsyncResource constructor.

+

The underlying AsyncResource

+

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest ...args: AnyRest

    Returns void

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    const { once, EventEmitter } = require('events');

    async function run() {
    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.log('error happened', err);
    }
    }

    run(); +
    +

    The special handling of the 'error' event is only used when events.once()is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    const { EventEmitter, once } = require('events');

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.log('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    +

    An AbortSignal can be used to cancel waiting for the event:

    +
    const { EventEmitter, once } = require('events');

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    +

    Parameters

    Returns Promise<any[]>

    Since

    v11.13.0, v10.16.0

    +
  • Parameters

    Returns Promise<any[]>

  • const { on, EventEmitter } = require('events');

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })(); +
    +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    const { on, EventEmitter } = require('events');
    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    +

    Parameters

    Returns AsyncIterableIterator<any>

    that iterates eventName events emitted by the emitter

    +

    Since

    v13.6.0, v12.16.0

    +
  • A class method that returns the number of listeners for the given eventNameregistered on the given emitter.

    +
    const { EventEmitter, listenerCount } = require('events');
    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    Since

    v0.9.12

    +

    Deprecated

    Since v3.2.0 - Use listenerCount instead.

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    const { getEventListeners, EventEmitter } = require('events');

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    getEventListeners(ee, 'foo'); // [listener]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    getEventListeners(et, 'foo'); // [listener]
    } +
    +

    Parameters

    Returns Function[]

    Since

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    +

    Parameters

    Returns number

    Since

    v18.17.0

    +
  • const {
    setMaxListeners,
    EventEmitter
    } = require('events');

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    +

    Parameters

    • Optional n: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest ...eventTargets: (EventEmitter<DefaultEventMap> | _DOMEventTarget)[]

    Returns void

    Since

    v15.4.0

    +
  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    +

    Parameters

    • signal: AbortSignal
    • resource: ((event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    Since

    v18.18.0

    +
  • Call all destroy hooks. This should only ever be called once. An +error will be thrown if it is called more than once. This must be +manually called. If the resource is left to be collected by the GC then +the destroy hooks will never be called.

    +

    Returns void

  • Alias for emitter.on(eventName, listener).

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v0.1.26

    +
  • Adds the listener function to the end of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventNameand listener will result in the listener being added, and called, multiple +times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. Theemitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event.

      +
    • listener: ((...args) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v0.1.101

    +
  • Adds a one-timelistener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. Theemitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event.

      +
    • listener: ((...args) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v0.3.0

    +
  • Removes the specified listener from the listener array for the event namedeventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that anyremoveListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping')listener is removed:

    +
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v0.1.26

    +
  • Alias for emitter.removeListener().

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v10.0.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • Optional event: string | symbol

    Returns this

    Since

    v0.1.26

    +
  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set toInfinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    Since

    v0.3.5

    +
  • Returns the current max listener value for the EventEmitter which is either +set by emitter.setMaxListeners(n) or defaults to defaultMaxListeners.

    +

    Returns number

    Since

    v1.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    });
    console.log(util.inspect(server.listeners('connection')));
    // Prints: [ [Function] ] +
    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

    Returns Function[]

    Since

    v0.1.26

    +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

    Returns Function[]

    Since

    v9.4.0

    +
  • Synchronously calls each of the listeners registered for the event namedeventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    const EventEmitter = require('events');
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol
    • Rest ...args: AnyRest

    Returns boolean

    Since

    v0.1.26

    +
  • Returns the number of listeners listening to the event named eventName.

    +

    If listener is provided, it will return how many times the listener +is found in the list of the listeners of the event.

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event being listened for

      +
    • Optional listener: Function

      The event handler function

      +

    Returns number

    Since

    v3.2.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventNameand listener will result in the listener being added, and called, multiple +times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event.

      +
    • listener: ((...args) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • K

    Parameters

    • eventName: string | symbol

      The name of the event.

      +
    • listener: ((...args) => void)

      The callback function

      +
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

    Since

    v6.0.0

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    const EventEmitter = require('events');
    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    +

    Returns (string | symbol)[]

    Since

    v6.0.0

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/index._internal_.EventEmitter.html b/classes/index._internal_.EventEmitter.html new file mode 100644 index 0000000..013ecf4 --- /dev/null +++ b/classes/index._internal_.EventEmitter.html @@ -0,0 +1,227 @@ +EventEmitter | @foxxmd/logging Docs

The EventEmitter class is defined and exposed by the events module:

+
const EventEmitter = require('events');
+
+

All EventEmitters emit the event 'newListener' when new listeners are +added and 'removeListener' when existing listeners are removed.

+

It supports the following option:

+

Since

v0.1.26

+

Type Parameters

Hierarchy (view full)

Constructors

Properties

errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' +events. Listeners installed using this symbol are called before the regular +'error' listeners are called.

+

Installing a listener using this symbol does not change the behavior once an +'error' event is emitted, therefore the process will still crash if no +regular 'error' listener is installed.

+
captureRejectionSymbol: typeof captureRejectionSymbol
captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

+
defaultMaxListeners: number

Methods

  • Type Parameters

    • K

    Parameters

    Returns void

  • Creates a Promise that is fulfilled when the EventEmitter emits the given +event or that is rejected if the EventEmitter emits 'error' while waiting. +The Promise will resolve with an array of all the arguments emitted to the +given event.

    +

    This method is intentionally generic and works with the web platform EventTarget interface, which has no special'error' event +semantics and does not listen to the 'error' event.

    +
    const { once, EventEmitter } = require('events');

    async function run() {
    const ee = new EventEmitter();

    process.nextTick(() => {
    ee.emit('myevent', 42);
    });

    const [value] = await once(ee, 'myevent');
    console.log(value);

    const err = new Error('kaboom');
    process.nextTick(() => {
    ee.emit('error', err);
    });

    try {
    await once(ee, 'myevent');
    } catch (err) {
    console.log('error happened', err);
    }
    }

    run(); +
    +

    The special handling of the 'error' event is only used when events.once()is used to wait for another event. If events.once() is used to wait for the +'error' event itself, then it is treated as any other kind of event without +special handling:

    +
    const { EventEmitter, once } = require('events');

    const ee = new EventEmitter();

    once(ee, 'error')
    .then(([err]) => console.log('ok', err.message))
    .catch((err) => console.log('error', err.message));

    ee.emit('error', new Error('boom'));

    // Prints: ok boom +
    +

    An AbortSignal can be used to cancel waiting for the event:

    +
    const { EventEmitter, once } = require('events');

    const ee = new EventEmitter();
    const ac = new AbortController();

    async function foo(emitter, event, signal) {
    try {
    await once(emitter, event, { signal });
    console.log('event emitted!');
    } catch (error) {
    if (error.name === 'AbortError') {
    console.error('Waiting for the event was canceled!');
    } else {
    console.error('There was an error', error.message);
    }
    }
    }

    foo(ee, 'foo', ac.signal);
    ac.abort(); // Abort waiting for the event
    ee.emit('foo'); // Prints: Waiting for the event was canceled! +
    +

    Parameters

    Returns Promise<any[]>

    Since

    v11.13.0, v10.16.0

    +
  • Parameters

    Returns Promise<any[]>

  • const { on, EventEmitter } = require('events');

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo')) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })(); +
    +

    Returns an AsyncIterator that iterates eventName events. It will throw +if the EventEmitter emits 'error'. It removes all listeners when +exiting the loop. The value returned by each iteration is an array +composed of the emitted event arguments.

    +

    An AbortSignal can be used to cancel waiting on events:

    +
    const { on, EventEmitter } = require('events');
    const ac = new AbortController();

    (async () => {
    const ee = new EventEmitter();

    // Emit later on
    process.nextTick(() => {
    ee.emit('foo', 'bar');
    ee.emit('foo', 42);
    });

    for await (const event of on(ee, 'foo', { signal: ac.signal })) {
    // The execution of this inner block is synchronous and it
    // processes one event at a time (even with await). Do not use
    // if concurrent execution is required.
    console.log(event); // prints ['bar'] [42]
    }
    // Unreachable here
    })();

    process.nextTick(() => ac.abort()); +
    +

    Parameters

    Returns AsyncIterableIterator<any>

    that iterates eventName events emitted by the emitter

    +

    Since

    v13.6.0, v12.16.0

    +
  • A class method that returns the number of listeners for the given eventNameregistered on the given emitter.

    +
    const { EventEmitter, listenerCount } = require('events');
    const myEmitter = new EventEmitter();
    myEmitter.on('event', () => {});
    myEmitter.on('event', () => {});
    console.log(listenerCount(myEmitter, 'event'));
    // Prints: 2 +
    +

    Parameters

    • emitter: EventEmitter<DefaultEventMap>

      The emitter to query

      +
    • eventName: string | symbol

      The event name

      +

    Returns number

    Since

    v0.9.12

    +

    Deprecated

    Since v3.2.0 - Use listenerCount instead.

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +

    For EventEmitters this behaves exactly the same as calling .listeners on +the emitter.

    +

    For EventTargets this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes.

    +
    const { getEventListeners, EventEmitter } = require('events');

    {
    const ee = new EventEmitter();
    const listener = () => console.log('Events are fun');
    ee.on('foo', listener);
    getEventListeners(ee, 'foo'); // [listener]
    }
    {
    const et = new EventTarget();
    const listener = () => console.log('Events are fun');
    et.addEventListener('foo', listener);
    getEventListeners(et, 'foo'); // [listener]
    } +
    +

    Parameters

    Returns Function[]

    Since

    v15.2.0, v14.17.0

    +
  • Returns the currently set max amount of listeners.

    +

    For EventEmitters this behaves exactly the same as calling .getMaxListeners on +the emitter.

    +

    For EventTargets this is the only way to get the max event listeners for the +event target. If the number of event handlers on a single EventTarget exceeds +the max set, the EventTarget will print a warning.

    +
    import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';

    {
    const ee = new EventEmitter();
    console.log(getMaxListeners(ee)); // 10
    setMaxListeners(11, ee);
    console.log(getMaxListeners(ee)); // 11
    }
    {
    const et = new EventTarget();
    console.log(getMaxListeners(et)); // 10
    setMaxListeners(11, et);
    console.log(getMaxListeners(et)); // 11
    } +
    +

    Parameters

    Returns number

    Since

    v18.17.0

    +
  • const {
    setMaxListeners,
    EventEmitter
    } = require('events');

    const target = new EventTarget();
    const emitter = new EventEmitter();

    setMaxListeners(5, target, emitter); +
    +

    Parameters

    • Optional n: number

      A non-negative number. The maximum number of listeners per EventTarget event.

      +
    • Rest ...eventTargets: (EventEmitter<DefaultEventMap> | _DOMEventTarget)[]

    Returns void

    Since

    v15.4.0

    +
  • Experimental

    Listens once to the abort event on the provided signal.

    +

    Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

    +

    This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

    +

    Returns a disposable so that it may be unsubscribed from more easily.

    +
    import { addAbortListener } from 'node:events';

    function example(signal) {
    let disposable;
    try {
    signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
    disposable = addAbortListener(signal, (e) => {
    // Do something when signal is aborted.
    });
    } finally {
    disposable?.[Symbol.dispose]();
    }
    } +
    +

    Parameters

    • signal: AbortSignal
    • resource: ((event) => void)
        • (event): void
        • Parameters

          • event: Event

          Returns void

    Returns Disposable

    Disposable that removes the abort listener.

    +

    Since

    v18.18.0

    +
  • Alias for emitter.on(eventName, listener).

    +

    Type Parameters

    • K

    Parameters

    Returns this

    Since

    v0.1.26

    +
  • Adds the listener function to the end of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventNameand listener will result in the listener being added, and called, multiple +times.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    }); +
    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. Theemitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    const myEE = new EventEmitter();
    myEE.on('foo', () => console.log('a'));
    myEE.prependListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    +

    Type Parameters

    • K

    Parameters

    • eventName: Key<K, T>

      The name of the event.

      +
    • listener: Listener<K, T, ((...args) => void)>

      The callback function

      +

    Returns this

    Since

    v0.1.101

    +
  • Adds a one-timelistener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

    +
    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    By default, event listeners are invoked in the order they are added. Theemitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

    +
    const myEE = new EventEmitter();
    myEE.once('foo', () => console.log('a'));
    myEE.prependOnceListener('foo', () => console.log('b'));
    myEE.emit('foo');
    // Prints:
    // b
    // a +
    +

    Type Parameters

    • K

    Parameters

    • eventName: Key<K, T>

      The name of the event.

      +
    • listener: Listener<K, T, ((...args) => void)>

      The callback function

      +

    Returns this

    Since

    v0.3.0

    +
  • Removes the specified listener from the listener array for the event namedeventName.

    +
    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback); +
    +

    removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

    +

    Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that anyremoveListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

    +
    const myEmitter = new MyEmitter();

    const callbackA = () => {
    console.log('A');
    myEmitter.removeListener('event', callbackB);
    };

    const callbackB = () => {
    console.log('B');
    };

    myEmitter.on('event', callbackA);

    myEmitter.on('event', callbackB);

    // callbackA removes listener callbackB but it will still be called.
    // Internal listener array at time of emit [callbackA, callbackB]
    myEmitter.emit('event');
    // Prints:
    // A
    // B

    // callbackB is now removed.
    // Internal listener array [callbackA]
    myEmitter.emit('event');
    // Prints:
    // A +
    +

    Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

    +

    When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping')listener is removed:

    +
    const ee = new EventEmitter();

    function pong() {
    console.log('pong');
    }

    ee.on('ping', pong);
    ee.once('ping', pong);
    ee.removeListener('ping', pong);

    ee.emit('ping');
    ee.emit('ping'); +
    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • K

    Parameters

    Returns this

    Since

    v0.1.26

    +
  • Alias for emitter.removeListener().

    +

    Type Parameters

    • K

    Parameters

    Returns this

    Since

    v10.0.0

    +
  • Removes all listeners, or those of the specified eventName.

    +

    It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • Optional event: Key<unknown, T>

    Returns this

    Since

    v0.1.26

    +
  • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set toInfinity (or 0) to indicate an unlimited number of listeners.

    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Parameters

    • n: number

    Returns this

    Since

    v0.3.5

    +
  • Returns the current max listener value for the EventEmitter which is either +set by emitter.setMaxListeners(n) or defaults to defaultMaxListeners.

    +

    Returns number

    Since

    v1.0.0

    +
  • Returns a copy of the array of listeners for the event named eventName.

    +
    server.on('connection', (stream) => {
    console.log('someone connected!');
    });
    console.log(util.inspect(server.listeners('connection')));
    // Prints: [ [Function] ] +
    +

    Type Parameters

    • K

    Parameters

    Returns Listener<K, T, Function>[]

    Since

    v0.1.26

    +
  • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

    +
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log'); +
    +

    Type Parameters

    • K

    Parameters

    Returns Listener<K, T, Function>[]

    Since

    v9.4.0

    +
  • Synchronously calls each of the listeners registered for the event namedeventName, in the order they were registered, passing the supplied arguments +to each.

    +

    Returns true if the event had listeners, false otherwise.

    +
    const EventEmitter = require('events');
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener +
    +

    Type Parameters

    • K

    Parameters

    Returns boolean

    Since

    v0.1.26

    +
  • Returns the number of listeners listening to the event named eventName.

    +

    If listener is provided, it will return how many times the listener +is found in the list of the listeners of the event.

    +

    Type Parameters

    • K

    Parameters

    • eventName: Key<K, T>

      The name of the event being listened for

      +
    • Optional listener: Listener<K, T, Function>

      The event handler function

      +

    Returns number

    Since

    v3.2.0

    +
  • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventNameand listener will result in the listener being added, and called, multiple +times.

    +
    server.prependListener('connection', (stream) => {
    console.log('someone connected!');
    }); +
    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • K

    Parameters

    • eventName: Key<K, T>

      The name of the event.

      +
    • listener: Listener<K, T, ((...args) => void)>

      The callback function

      +

    Returns this

    Since

    v6.0.0

    +
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

    +
    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    }); +
    +

    Returns a reference to the EventEmitter, so that calls can be chained.

    +

    Type Parameters

    • K

    Parameters

    • eventName: Key<K, T>

      The name of the event.

      +
    • listener: Listener<K, T, ((...args) => void)>

      The callback function

      +

    Returns this

    Since

    v6.0.0

    +
  • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

    +
    const EventEmitter = require('events');
    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
    +

    Returns ((string | symbol) & Key2<unknown, T>)[]

    Since

    v6.0.0

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildDestinationFile.html b/functions/factory.buildDestinationFile.html index 404e1d0..f0c1bc8 100644 --- a/functions/factory.buildDestinationFile.html +++ b/functions/factory.buildDestinationFile.html @@ -1 +1 @@ -buildDestinationFile | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file +buildDestinationFile | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildDestinationRollingFile.html b/functions/factory.buildDestinationRollingFile.html index a528363..c2e3841 100644 --- a/functions/factory.buildDestinationRollingFile.html +++ b/functions/factory.buildDestinationRollingFile.html @@ -1 +1 @@ -buildDestinationRollingFile | @foxxmd/logging Docs

Function buildDestinationRollingFile

Generated using TypeDoc

\ No newline at end of file +buildDestinationRollingFile | @foxxmd/logging Docs

Function buildDestinationRollingFile

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildDestinationStderr.html b/functions/factory.buildDestinationStderr.html index e1e44e1..75d707b 100644 --- a/functions/factory.buildDestinationStderr.html +++ b/functions/factory.buildDestinationStderr.html @@ -1 +1 @@ -buildDestinationStderr | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file +buildDestinationStderr | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildDestinationStdout.html b/functions/factory.buildDestinationStdout.html index 235c7af..24f594b 100644 --- a/functions/factory.buildDestinationStdout.html +++ b/functions/factory.buildDestinationStdout.html @@ -1 +1 @@ -buildDestinationStdout | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file +buildDestinationStdout | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildDestinationStream.html b/functions/factory.buildDestinationStream.html index 9743f20..6f0e984 100644 --- a/functions/factory.buildDestinationStream.html +++ b/functions/factory.buildDestinationStream.html @@ -1 +1 @@ -buildDestinationStream | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file +buildDestinationStream | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildLogger.html b/functions/factory.buildLogger.html index 1dd9334..fc9d2e5 100644 --- a/functions/factory.buildLogger.html +++ b/functions/factory.buildLogger.html @@ -1 +1 @@ -buildLogger | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file +buildLogger | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.prettyOptsFactory.html b/functions/factory.prettyOptsFactory.html index 2093747..e7d6fc9 100644 --- a/functions/factory.prettyOptsFactory.html +++ b/functions/factory.prettyOptsFactory.html @@ -1 +1 @@ -prettyOptsFactory | @foxxmd/logging Docs
  • Parameters

    • opts: PrettyOptions_ = {}

    Returns PrettyOptions_

Generated using TypeDoc

\ No newline at end of file +prettyOptsFactory | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/index.childLogger.html b/functions/index.childLogger.html index e7f72d7..cafee51 100644 --- a/functions/index.childLogger.html +++ b/functions/index.childLogger.html @@ -1 +1 @@ -childLogger | @foxxmd/logging Docs
  • Parameters

    • parent: Logger
    • labelsVal: any = []
    • context: object = {}
    • options: {} = {}

      Returns Logger

    Generated using TypeDoc

    \ No newline at end of file +childLogger | @foxxmd/logging Docs
    • Parameters

      • parent: Logger
      • labelsVal: any = []
      • context: object = {}
      • options: {} = {}

        Returns Logger

      Generated using TypeDoc

      \ No newline at end of file diff --git a/functions/index.isLogOptions.html b/functions/index.isLogOptions.html index 7c4fe35..b27cb30 100644 --- a/functions/index.isLogOptions.html +++ b/functions/index.isLogOptions.html @@ -1 +1 @@ -isLogOptions | @foxxmd/logging Docs

      Generated using TypeDoc

      \ No newline at end of file +isLogOptions | @foxxmd/logging Docs

      Generated using TypeDoc

      \ No newline at end of file diff --git a/functions/index.loggerApp.html b/functions/index.loggerApp.html index afad120..381fbe5 100644 --- a/functions/index.loggerApp.html +++ b/functions/index.loggerApp.html @@ -1 +1 @@ -loggerApp | @foxxmd/logging Docs

      Generated using TypeDoc

      \ No newline at end of file +loggerApp | @foxxmd/logging Docs

      Generated using TypeDoc

      \ No newline at end of file diff --git a/functions/index.loggerAppRolling.html b/functions/index.loggerAppRolling.html index 80b3ec1..8db80e4 100644 --- a/functions/index.loggerAppRolling.html +++ b/functions/index.loggerAppRolling.html @@ -1 +1 @@ -loggerAppRolling | @foxxmd/logging Docs

      Generated using TypeDoc

      \ No newline at end of file +loggerAppRolling | @foxxmd/logging Docs

      Generated using TypeDoc

      \ No newline at end of file diff --git a/functions/index.parseLogOptions.html b/functions/index.parseLogOptions.html index a30941d..54e8986 100644 --- a/functions/index.parseLogOptions.html +++ b/functions/index.parseLogOptions.html @@ -1 +1 @@ -parseLogOptions | @foxxmd/logging Docs

      Generated using TypeDoc

      \ No newline at end of file +parseLogOptions | @foxxmd/logging Docs

      Generated using TypeDoc

      \ No newline at end of file diff --git a/hierarchy.html b/hierarchy.html new file mode 100644 index 0000000..1db7f53 --- /dev/null +++ b/hierarchy.html @@ -0,0 +1 @@ +@foxxmd/logging Docs

      @foxxmd/logging Docs

      Class Hierarchy

      Generated using TypeDoc

      \ No newline at end of file diff --git a/index.html b/index.html index f49c996..bc28fde 100644 --- a/index.html +++ b/index.html @@ -20,8 +20,10 @@ -

      +

      +

      Install

      npm install @foxxmd/logging
       

      Quick Start

      import { loggerAppRolling, loggerApp } from "@foxxmd/logging";

      const logger = loggerApp();
      logger.info('Test');
      /*
      * Logs to -> console, colorized
      * Logs to -> CWD/logs/app.log
      *
      * [2024-03-07 10:31:34.963 -0500] DEBUG: Test
      * */


      // or for rolling log files we need to scan logs dir before opening a file
      // and need to await initial logger
      const rollingLogger = await loggerAppRolling();
      rollingLogger.info('Test');
      /*
      * Logs to -> console, colorized
      * Logs to daily log file, max 10MB size -> CWD/logs/app.1.log
      *
      * [2024-03-07 10:31:34.963 -0500] DEBUG: Test
      * */ diff --git a/interfaces/factory._internal_.Colorette.html b/interfaces/factory._internal_.Colorette.html new file mode 100644 index 0000000..f9f7925 --- /dev/null +++ b/interfaces/factory._internal_.Colorette.html @@ -0,0 +1,42 @@ +Colorette | @foxxmd/logging Docs
      interface Colorette {
          reset: Color;
          bold: Color;
          dim: Color;
          italic: Color;
          underline: Color;
          inverse: Color;
          hidden: Color;
          strikethrough: Color;
          black: Color;
          red: Color;
          green: Color;
          yellow: Color;
          blue: Color;
          magenta: Color;
          cyan: Color;
          white: Color;
          gray: Color;
          bgBlack: Color;
          bgRed: Color;
          bgGreen: Color;
          bgYellow: Color;
          bgBlue: Color;
          bgMagenta: Color;
          bgCyan: Color;
          bgWhite: Color;
          blackBright: Color;
          redBright: Color;
          greenBright: Color;
          yellowBright: Color;
          blueBright: Color;
          magentaBright: Color;
          cyanBright: Color;
          whiteBright: Color;
          bgBlackBright: Color;
          bgRedBright: Color;
          bgGreenBright: Color;
          bgYellowBright: Color;
          bgBlueBright: Color;
          bgMagentaBright: Color;
          bgCyanBright: Color;
          bgWhiteBright: Color;
      }

      Properties

      reset: Color
      bold: Color
      dim: Color
      italic: Color
      underline: Color
      inverse: Color
      hidden: Color
      strikethrough: Color
      black: Color
      red: Color
      green: Color
      yellow: Color
      blue: Color
      magenta: Color
      cyan: Color
      white: Color
      gray: Color
      bgBlack: Color
      bgRed: Color
      bgGreen: Color
      bgYellow: Color
      bgBlue: Color
      bgMagenta: Color
      bgCyan: Color
      bgWhite: Color
      blackBright: Color
      redBright: Color
      greenBright: Color
      yellowBright: Color
      blueBright: Color
      magentaBright: Color
      cyanBright: Color
      whiteBright: Color
      bgBlackBright: Color
      bgRedBright: Color
      bgGreenBright: Color
      bgYellowBright: Color
      bgBlueBright: Color
      bgMagentaBright: Color
      bgCyanBright: Color
      bgWhiteBright: Color

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/factory._internal_.DestinationStream.html b/interfaces/factory._internal_.DestinationStream.html new file mode 100644 index 0000000..3d96c7b --- /dev/null +++ b/interfaces/factory._internal_.DestinationStream.html @@ -0,0 +1,2 @@ +DestinationStream | @foxxmd/logging Docs
      interface DestinationStream {
          write(msg): void;
      }

      Hierarchy (view full)

      Methods

      Methods

      • Parameters

        • msg: string

        Returns void

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/factory._internal_.PrettyOptions_.html b/interfaces/factory._internal_.PrettyOptions_.html new file mode 100644 index 0000000..23503c4 --- /dev/null +++ b/interfaces/factory._internal_.PrettyOptions_.html @@ -0,0 +1,120 @@ +PrettyOptions_ | @foxxmd/logging Docs
      interface PrettyOptions_ {
          hideObject?: boolean;
          translateTime?: string | boolean;
          levelFirst?: boolean;
          levelKey?: string;
          levelLabel?: string;
          messageKey?: string;
          singleLine?: boolean;
          timestampKey?: string;
          minimumLevel?: Level;
          messageFormat?: string | false | MessageFormatFunc;
          colorize?: boolean;
          colorizeObjects?: boolean;
          crlf?: boolean;
          errorLikeObjectKeys?: string[];
          errorProps?: string;
          ignore?: string;
          include?: string;
          sync?: boolean;
          destination?: string | number | DestinationStream | WritableStream;
          append?: boolean;
          mkdir?: boolean;
          customPrettifiers?: Record<string, Prettifier<object>> & {
              level?: Prettifier<LevelPrettifierExtras>;
          };
          customLevels?: string | object;
          customColors?: string | object;
      }

      Properties

      hideObject?: boolean

      Hide objects from output (but not error object).

      +

      Default

      false
      +
      +
      translateTime?: string | boolean

      Translate the epoch time value into a human readable date and time string. This flag also can set the format +string to apply when translating the date to human readable format. For a list of available pattern letters +see the documentation.

      +
        +
      • The default format is yyyy-mm-dd HH:MM:ss.l o in UTC.
      • +
      • Requires a SYS: prefix to translate time to the local system's timezone. Use the shortcut SYS:standard +to translate time to yyyy-mm-dd HH:MM:ss.l o in system timezone.
      • +
      +

      Default

      false
      +
      +
      levelFirst?: boolean

      If set to true, it will print the name of the log level as the first field in the log line.

      +

      Default

      false
      +
      +
      levelKey?: string

      Define the key that contains the level of the log.

      +

      Default

      "level"
      +
      +
      levelLabel?: string

      Output the log level using the specified label.

      +

      Default

      "levelLabel"
      +
      +
      messageKey?: string

      The key in the JSON object to use as the highlighted message.

      +

      Default

      "msg"
      +
      +
      singleLine?: boolean

      Print each log message on a single line (errors will still be multi-line).

      +

      Default

      false
      +
      +
      timestampKey?: string

      The key in the JSON object to use for timestamp display.

      +

      Default

      "time"
      +
      +
      minimumLevel?: Level

      The minimum log level to include in the output.

      +

      Default

      "trace"
      +
      +
      messageFormat?: string | false | MessageFormatFunc

      Format output of message, e.g. {level} - {pid} will output message: INFO - 1123

      +

      Default

      false
      +
      +

      Example

      {
      messageFormat: (log, messageKey) => {
      const message = log[messageKey];
      if (log.requestId) return `[${log.requestId}] ${message}`;
      return message;
      }
      } +
      +
      colorize?: boolean

      If set to true, will add color information to the formatted output message.

      +

      Default

      false
      +
      +
      colorizeObjects?: boolean

      If set to false while colorize is true, will output JSON objects without color.

      +

      Default

      true
      +
      +
      crlf?: boolean

      Appends carriage return and line feed, instead of just a line feed, to the formatted log line.

      +

      Default

      false
      +
      +
      errorLikeObjectKeys?: string[]

      Define the log keys that are associated with error like objects.

      +

      Default

      ["err", "error"]
      +
      +
      errorProps?: string

      When formatting an error object, display this list of properties. + The list should be a comma separated list of properties.

      +

      Default

      ""
      +
      +
      ignore?: string

      Ignore one or several keys. +Will be overridden by the option include if include is presented.

      +

      Example

      "time,hostname"
      +
      +
      include?: string

      Include one or several keys.

      +

      Example

      "time,level"
      +
      +
      sync?: boolean

      Makes messaging synchronous.

      +

      Default

      false
      +
      +
      destination?: string | number | DestinationStream | WritableStream

      The file, file descriptor, or stream to write to. Defaults to 1 (stdout).

      +

      Default

      1
      +
      +
      append?: boolean

      Opens the file with the 'a' flag.

      +

      Default

      true
      +
      +
      mkdir?: boolean

      Ensure directory for destination file exists.

      +

      Default

      false
      +
      +
      customPrettifiers?: Record<string, Prettifier<object>> & {
          level?: Prettifier<LevelPrettifierExtras>;
      }

      Provides the ability to add a custom prettify function for specific log properties. +customPrettifiers is an object, where keys are log properties that will be prettified +and value is the prettify function itself. +For example, if a log line contains a query property, you can specify a prettifier for it:

      +

      Type declaration

      Default

      {}
      +
      +

      Example

      {
      customPrettifiers: {
      query: prettifyQuery
      }
      }
      //...
      const prettifyQuery = value => {
      // do some prettify magic
      } +
      +
      customLevels?: string | object

      Change the level names and values to an user custom preset.

      +

      Can be a CSV string in 'level_name:level_value' format or an object.

      +

      Example

      ( CSV ) customLevels: 'info:10,some_level:40'
      +
      +

      Example

      ( Object ) customLevels: { info: 10, some_level: 40 }
      +
      +
      customColors?: string | object

      Change the level colors to an user custom preset.

      +

      Can be a CSV string in 'level_name:color_value' format or an object. +Also supports 'default' as level_name for fallback color.

      +

      Example

      ( CSV ) customColors: 'info:white,some_level:red'
      +
      +

      Example

      ( Object ) customColors: { info: 'white', some_level: 'red' }
      +
      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/factory._internal_.WritableStream.html b/interfaces/factory._internal_.WritableStream.html new file mode 100644 index 0000000..6c2261a --- /dev/null +++ b/interfaces/factory._internal_.WritableStream.html @@ -0,0 +1,133 @@ +WritableStream | @foxxmd/logging Docs
      interface WritableStream {
          [captureRejectionSymbol]?<K>(error, event, ...args): void;
          addListener<K>(eventName, listener): this;
          on<K>(eventName, listener): this;
          once<K>(eventName, listener): this;
          removeListener<K>(eventName, listener): this;
          off<K>(eventName, listener): this;
          removeAllListeners(event?): this;
          setMaxListeners(n): this;
          getMaxListeners(): number;
          listeners<K>(eventName): Function[];
          rawListeners<K>(eventName): Function[];
          emit<K>(eventName, ...args): boolean;
          listenerCount<K>(eventName, listener?): number;
          prependListener<K>(eventName, listener): this;
          prependOnceListener<K>(eventName, listener): this;
          eventNames(): (string | symbol)[];
          writable: boolean;
          write(buffer, cb?): boolean;
          write(str, encoding?, cb?): boolean;
          end(cb?): this;
          end(data, cb?): this;
          end(str, encoding?, cb?): this;
      }

      Hierarchy

      • EventEmitter
        • WritableStream

      Properties

      writable: boolean

      Methods

      • Type Parameters

        • K

        Parameters

        • error: Error
        • event: string | symbol
        • Rest ...args: AnyRest

        Returns void

      • Alias for emitter.on(eventName, listener).

        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol
        • listener: ((...args) => void)
            • (...args): void
            • Parameters

              • Rest ...args: any[]

              Returns void

        Returns this

        Since

        v0.1.26

        +
      • Adds the listener function to the end of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventNameand listener will result in the listener being added, and called, multiple +times.

        +
        server.on('connection', (stream) => {
        console.log('someone connected!');
        }); +
        +

        Returns a reference to the EventEmitter, so that calls can be chained.

        +

        By default, event listeners are invoked in the order they are added. Theemitter.prependListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

        +
        const myEE = new EventEmitter();
        myEE.on('foo', () => console.log('a'));
        myEE.prependListener('foo', () => console.log('b'));
        myEE.emit('foo');
        // Prints:
        // b
        // a +
        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol

          The name of the event.

          +
        • listener: ((...args) => void)

          The callback function

          +
            • (...args): void
            • Parameters

              • Rest ...args: any[]

              Returns void

        Returns this

        Since

        v0.1.101

        +
      • Adds a one-timelistener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

        +
        server.once('connection', (stream) => {
        console.log('Ah, we have our first user!');
        }); +
        +

        Returns a reference to the EventEmitter, so that calls can be chained.

        +

        By default, event listeners are invoked in the order they are added. Theemitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

        +
        const myEE = new EventEmitter();
        myEE.once('foo', () => console.log('a'));
        myEE.prependOnceListener('foo', () => console.log('b'));
        myEE.emit('foo');
        // Prints:
        // b
        // a +
        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol

          The name of the event.

          +
        • listener: ((...args) => void)

          The callback function

          +
            • (...args): void
            • Parameters

              • Rest ...args: any[]

              Returns void

        Returns this

        Since

        v0.3.0

        +
      • Removes the specified listener from the listener array for the event namedeventName.

        +
        const callback = (stream) => {
        console.log('someone connected!');
        };
        server.on('connection', callback);
        // ...
        server.removeListener('connection', callback); +
        +

        removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

        +

        Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that anyremoveListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

        +
        const myEmitter = new MyEmitter();

        const callbackA = () => {
        console.log('A');
        myEmitter.removeListener('event', callbackB);
        };

        const callbackB = () => {
        console.log('B');
        };

        myEmitter.on('event', callbackA);

        myEmitter.on('event', callbackB);

        // callbackA removes listener callbackB but it will still be called.
        // Internal listener array at time of emit [callbackA, callbackB]
        myEmitter.emit('event');
        // Prints:
        // A
        // B

        // callbackB is now removed.
        // Internal listener array [callbackA]
        myEmitter.emit('event');
        // Prints:
        // A +
        +

        Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

        +

        When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping')listener is removed:

        +
        const ee = new EventEmitter();

        function pong() {
        console.log('pong');
        }

        ee.on('ping', pong);
        ee.once('ping', pong);
        ee.removeListener('ping', pong);

        ee.emit('ping');
        ee.emit('ping'); +
        +

        Returns a reference to the EventEmitter, so that calls can be chained.

        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol
        • listener: ((...args) => void)
            • (...args): void
            • Parameters

              • Rest ...args: any[]

              Returns void

        Returns this

        Since

        v0.1.26

        +
      • Alias for emitter.removeListener().

        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol
        • listener: ((...args) => void)
            • (...args): void
            • Parameters

              • Rest ...args: any[]

              Returns void

        Returns this

        Since

        v10.0.0

        +
      • Removes all listeners, or those of the specified eventName.

        +

        It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

        +

        Returns a reference to the EventEmitter, so that calls can be chained.

        +

        Parameters

        • Optional event: string | symbol

        Returns this

        Since

        v0.1.26

        +
      • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set toInfinity (or 0) to indicate an unlimited number of listeners.

        +

        Returns a reference to the EventEmitter, so that calls can be chained.

        +

        Parameters

        • n: number

        Returns this

        Since

        v0.3.5

        +
      • Returns the current max listener value for the EventEmitter which is either +set by emitter.setMaxListeners(n) or defaults to defaultMaxListeners.

        +

        Returns number

        Since

        v1.0.0

        +
      • Returns a copy of the array of listeners for the event named eventName.

        +
        server.on('connection', (stream) => {
        console.log('someone connected!');
        });
        console.log(util.inspect(server.listeners('connection')));
        // Prints: [ [Function] ] +
        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol

        Returns Function[]

        Since

        v0.1.26

        +
      • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

        +
        const emitter = new EventEmitter();
        emitter.once('log', () => console.log('log once'));

        // Returns a new Array with a function `onceWrapper` which has a property
        // `listener` which contains the original listener bound above
        const listeners = emitter.rawListeners('log');
        const logFnWrapper = listeners[0];

        // Logs "log once" to the console and does not unbind the `once` event
        logFnWrapper.listener();

        // Logs "log once" to the console and removes the listener
        logFnWrapper();

        emitter.on('log', () => console.log('log persistently'));
        // Will return a new Array with a single function bound by `.on()` above
        const newListeners = emitter.rawListeners('log');

        // Logs "log persistently" twice
        newListeners[0]();
        emitter.emit('log'); +
        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol

        Returns Function[]

        Since

        v9.4.0

        +
      • Synchronously calls each of the listeners registered for the event namedeventName, in the order they were registered, passing the supplied arguments +to each.

        +

        Returns true if the event had listeners, false otherwise.

        +
        const EventEmitter = require('events');
        const myEmitter = new EventEmitter();

        // First listener
        myEmitter.on('event', function firstListener() {
        console.log('Helloooo! first listener');
        });
        // Second listener
        myEmitter.on('event', function secondListener(arg1, arg2) {
        console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
        });
        // Third listener
        myEmitter.on('event', function thirdListener(...args) {
        const parameters = args.join(', ');
        console.log(`event with parameters ${parameters} in third listener`);
        });

        console.log(myEmitter.listeners('event'));

        myEmitter.emit('event', 1, 2, 3, 4, 5);

        // Prints:
        // [
        // [Function: firstListener],
        // [Function: secondListener],
        // [Function: thirdListener]
        // ]
        // Helloooo! first listener
        // event with parameters 1, 2 in second listener
        // event with parameters 1, 2, 3, 4, 5 in third listener +
        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol
        • Rest ...args: AnyRest

        Returns boolean

        Since

        v0.1.26

        +
      • Returns the number of listeners listening to the event named eventName.

        +

        If listener is provided, it will return how many times the listener +is found in the list of the listeners of the event.

        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol

          The name of the event being listened for

          +
        • Optional listener: Function

          The event handler function

          +

        Returns number

        Since

        v3.2.0

        +
      • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventNameand listener will result in the listener being added, and called, multiple +times.

        +
        server.prependListener('connection', (stream) => {
        console.log('someone connected!');
        }); +
        +

        Returns a reference to the EventEmitter, so that calls can be chained.

        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol

          The name of the event.

          +
        • listener: ((...args) => void)

          The callback function

          +
            • (...args): void
            • Parameters

              • Rest ...args: any[]

              Returns void

        Returns this

        Since

        v6.0.0

        +
      • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

        +
        server.prependOnceListener('connection', (stream) => {
        console.log('Ah, we have our first user!');
        }); +
        +

        Returns a reference to the EventEmitter, so that calls can be chained.

        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol

          The name of the event.

          +
        • listener: ((...args) => void)

          The callback function

          +
            • (...args): void
            • Parameters

              • Rest ...args: any[]

              Returns void

        Returns this

        Since

        v6.0.0

        +
      • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

        +
        const EventEmitter = require('events');
        const myEE = new EventEmitter();
        myEE.on('foo', () => {});
        myEE.on('bar', () => {});

        const sym = Symbol('symbol');
        myEE.on(sym, () => {});

        console.log(myEE.eventNames());
        // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
        +

        Returns (string | symbol)[]

        Since

        v6.0.0

        +
      • Parameters

        • buffer: string | Uint8Array
        • Optional cb: ((err?) => void)
            • (err?): void
            • Parameters

              • Optional err: Error

              Returns void

        Returns boolean

      • Parameters

        • str: string
        • Optional encoding: BufferEncoding
        • Optional cb: ((err?) => void)
            • (err?): void
            • Parameters

              • Optional err: Error

              Returns void

        Returns boolean

      • Parameters

        • Optional cb: (() => void)
            • (): void
            • Returns void

        Returns this

      • Parameters

        • data: string | Uint8Array
        • Optional cb: (() => void)
            • (): void
            • Returns void

        Returns this

      • Parameters

        • str: string
        • Optional encoding: BufferEncoding
        • Optional cb: (() => void)
            • (): void
            • Returns void

        Returns this

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index.LogOptions.html b/interfaces/index.LogOptions.html index 9ec9a71..2d02231 100644 --- a/interfaces/index.LogOptions.html +++ b/interfaces/index.LogOptions.html @@ -1,4 +1,4 @@ -LogOptions | @foxxmd/logging Docs
      interface LogOptions {
          level?: "silent" | "fatal" | "error" | "warn" | "info" | "log" | "verbose" | "debug";
          file?: false | "silent" | "fatal" | "error" | "warn" | "info" | "log" | "verbose" | "debug";
          filePath?: string | (() => string);
          console?: "silent" | "fatal" | "error" | "warn" | "info" | "log" | "verbose" | "debug";
      }

      Properties

      level? +LogOptions | @foxxmd/logging Docs
      interface LogOptions {
          level?: "silent" | "fatal" | "error" | "warn" | "info" | "log" | "verbose" | "debug";
          file?: false | "silent" | "fatal" | "error" | "warn" | "info" | "log" | "verbose" | "debug";
          filePath?: string | (() => string);
          console?: "silent" | "fatal" | "error" | "warn" | "info" | "log" | "verbose" | "debug";
      }

      Properties

      level? file? filePath? console? @@ -6,11 +6,11 @@

      Defaults to env LOG_LEVEL or info if not specified.

      Default

      'info'
       
      -
      file?: false | "silent" | "fatal" | "error" | "warn" | "info" | "log" | "verbose" | "debug"

      Specify the minimum log level to output to rotating files. If false no log files will be created.

      -
      filePath?: string | (() => string)

      The full path and filename to use for log files

      +
      file?: false | "silent" | "fatal" | "error" | "warn" | "info" | "log" | "verbose" | "debug"

      Specify the minimum log level to output to rotating files. If false no log files will be created.

      +
      filePath?: string | (() => string)

      The full path and filename to use for log files

      If using rolling files the filename will be appended with .N (a number) BEFORE the extension based on rolling status

      May also be specified using env LOG_PATH or a function that returns a string

      -

      Type declaration

        • (): string
        • Returns string

      Default

      'CWD/logs/app.log
      +

      Type declaration

        • (): string
        • Returns string

      Default

      'CWD/logs/app.log'
       
      -
      console?: "silent" | "fatal" | "error" | "warn" | "info" | "log" | "verbose" | "debug"

      Specify the minimum log level streamed to the console (or docker container)

      -

      Generated using TypeDoc

      \ No newline at end of file +
      console?: "silent" | "fatal" | "error" | "warn" | "info" | "log" | "verbose" | "debug"

      Specify the minimum log level streamed to the console (or docker container)

      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.AsyncIterableIterator.html b/interfaces/index._internal_.AsyncIterableIterator.html new file mode 100644 index 0000000..892bd38 --- /dev/null +++ b/interfaces/index._internal_.AsyncIterableIterator.html @@ -0,0 +1,5 @@ +AsyncIterableIterator | @foxxmd/logging Docs
      interface AsyncIterableIterator<T> {
          next(...args): Promise<IteratorResult<T, any>>;
          return?(value?): Promise<IteratorResult<T, any>>;
          throw?(e?): Promise<IteratorResult<T, any>>;
          [asyncIterator](): AsyncIterableIterator<T>;
      }

      Type Parameters

      • T

      Hierarchy (view full)

      Methods

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.AsyncIterator.html b/interfaces/index._internal_.AsyncIterator.html new file mode 100644 index 0000000..127670d --- /dev/null +++ b/interfaces/index._internal_.AsyncIterator.html @@ -0,0 +1,4 @@ +AsyncIterator | @foxxmd/logging Docs

      Interface AsyncIterator<T, TReturn, TNext>

      interface AsyncIterator<T, TReturn, TNext> {
          next(...args): Promise<IteratorResult<T, TReturn>>;
          return?(value?): Promise<IteratorResult<T, TReturn>>;
          throw?(e?): Promise<IteratorResult<T, TReturn>>;
      }

      Type Parameters

      • T
      • TReturn = any
      • TNext = undefined

      Hierarchy (view full)

      Methods

      Methods

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.AsyncResourceOptions.html b/interfaces/index._internal_.AsyncResourceOptions.html new file mode 100644 index 0000000..30f985d --- /dev/null +++ b/interfaces/index._internal_.AsyncResourceOptions.html @@ -0,0 +1,12 @@ +AsyncResourceOptions | @foxxmd/logging Docs
      interface AsyncResourceOptions {
          triggerAsyncId?: number;
          requireManualDestroy?: boolean;
      }

      Hierarchy (view full)

      Properties

      triggerAsyncId?: number

      The ID of the execution context that created this async event.

      +

      Default

      executionAsyncId()
      +
      +
      requireManualDestroy?: boolean

      Disables automatic emitDestroy when the object is garbage collected. +This usually does not need to be set (even if emitDestroy is called +manually), unless the resource's asyncId is retrieved and the +sensitive API's emitDestroy is called with it.

      +

      Default

      false
      +
      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.BaseLogger.html b/interfaces/index._internal_.BaseLogger.html new file mode 100644 index 0000000..6698a03 --- /dev/null +++ b/interfaces/index._internal_.BaseLogger.html @@ -0,0 +1,58 @@ +BaseLogger | @foxxmd/logging Docs
      interface BaseLogger {
          level: LevelWithSilentOrString;
          fatal: LogFn;
          error: LogFn;
          warn: LogFn;
          info: LogFn;
          debug: LogFn;
          trace: LogFn;
          silent: LogFn;
      }

      Properties

      Properties

      Set this property to the desired logging level. In order of priority, available levels are:

      +
        +
      • 'fatal'
      • +
      • 'error'
      • +
      • 'warn'
      • +
      • 'info'
      • +
      • 'debug'
      • +
      • 'trace'
      • +
      +

      The logging level is a minimum level. For instance if logger.level is 'info' then all 'fatal', 'error', 'warn', +and 'info' logs will be enabled.

      +

      You can pass 'silent' to disable logging.

      +
      fatal: LogFn

      Log at 'fatal' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. +If more args follows msg, these will be used to format msg using util.format.

      +

      Type Param: T:

      the interface of the object being serialized. Default is object.

      +

      Param: obj:

      object to be serialized

      +

      Param: msg:

      the log message to write

      +

      Param: ...args:

      format string values when msg is a format string

      +
      error: LogFn

      Log at 'error' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. +If more args follows msg, these will be used to format msg using util.format.

      +

      Type Param: T:

      the interface of the object being serialized. Default is object.

      +

      Param: obj:

      object to be serialized

      +

      Param: msg:

      the log message to write

      +

      Param: ...args:

      format string values when msg is a format string

      +
      warn: LogFn

      Log at 'warn' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. +If more args follows msg, these will be used to format msg using util.format.

      +

      Type Param: T:

      the interface of the object being serialized. Default is object.

      +

      Param: obj:

      object to be serialized

      +

      Param: msg:

      the log message to write

      +

      Param: ...args:

      format string values when msg is a format string

      +
      info: LogFn

      Log at 'info' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. +If more args follows msg, these will be used to format msg using util.format.

      +

      Type Param: T:

      the interface of the object being serialized. Default is object.

      +

      Param: obj:

      object to be serialized

      +

      Param: msg:

      the log message to write

      +

      Param: ...args:

      format string values when msg is a format string

      +
      debug: LogFn

      Log at 'debug' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. +If more args follows msg, these will be used to format msg using util.format.

      +

      Type Param: T:

      the interface of the object being serialized. Default is object.

      +

      Param: obj:

      object to be serialized

      +

      Param: msg:

      the log message to write

      +

      Param: ...args:

      format string values when msg is a format string

      +
      trace: LogFn

      Log at 'trace' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. +If more args follows msg, these will be used to format msg using util.format.

      +

      Type Param: T:

      the interface of the object being serialized. Default is object.

      +

      Param: obj:

      object to be serialized

      +

      Param: msg:

      the log message to write

      +

      Param: ...args:

      format string values when msg is a format string

      +
      silent: LogFn

      Noop function.

      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.CallSite.html b/interfaces/index._internal_.CallSite.html new file mode 100644 index 0000000..cad8b1a --- /dev/null +++ b/interfaces/index._internal_.CallSite.html @@ -0,0 +1,34 @@ +CallSite | @foxxmd/logging Docs
      interface CallSite {
          getThis(): unknown;
          getTypeName(): string;
          getFunction(): Function;
          getFunctionName(): string;
          getMethodName(): string;
          getFileName(): string;
          getLineNumber(): number;
          getColumnNumber(): number;
          getEvalOrigin(): string;
          isToplevel(): boolean;
          isEval(): boolean;
          isNative(): boolean;
          isConstructor(): boolean;
      }

      Methods

      • Value of "this"

        +

        Returns unknown

      • Type of "this" as a string. +This is the name of the function stored in the constructor field of +"this", if available. Otherwise the object's [[Class]] internal +property.

        +

        Returns string

      • Current function

        +

        Returns Function

      • Name of the current function, typically its name property. +If a name property is not available an attempt will be made to try +to infer a name from the function's context.

        +

        Returns string

      • Name of the property [of "this" or one of its prototypes] that holds +the current function

        +

        Returns string

      • Name of the script [if this function was defined in a script]

        +

        Returns string

      • Current line number [if this function was defined in a script]

        +

        Returns number

      • Current column number [if this function was defined in a script]

        +

        Returns number

      • A call site object representing the location where eval was called +[if this function was created using a call to eval]

        +

        Returns string

      • Is this a toplevel invocation, that is, is "this" the global object?

        +

        Returns boolean

      • Does this call take place in code defined by a call to eval?

        +

        Returns boolean

      • Is this call in native V8 code?

        +

        Returns boolean

      • Is this a constructor call?

        +

        Returns boolean

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.ChildLoggerOptions-1.html b/interfaces/index._internal_.ChildLoggerOptions-1.html new file mode 100644 index 0000000..3e06947 --- /dev/null +++ b/interfaces/index._internal_.ChildLoggerOptions-1.html @@ -0,0 +1,7 @@ +ChildLoggerOptions | @foxxmd/logging Docs

      Interface ChildLoggerOptions<CustomLevels>

      interface ChildLoggerOptions<CustomLevels> {
          level?: LevelOrString;
          serializers?: {
              [key: string]: SerializerFn;
          };
          customLevels?: {
              [level in string]: number
          };
          formatters?: {
              level?: ((label, number) => object);
              bindings?: ((bindings) => object);
              log?: ((object) => object);
          };
          redact?: string[] | redactOptions;
          msgPrefix?: string;
      }

      Type Parameters

      • CustomLevels extends string = never

      Hierarchy (view full)

      Properties

      serializers?: {
          [key: string]: SerializerFn;
      }

      Type declaration

      customLevels?: {
          [level in string]: number
      }
      formatters?: {
          level?: ((label, number) => object);
          bindings?: ((bindings) => object);
          log?: ((object) => object);
      }

      Type declaration

      • Optional level?: ((label, number) => object)
          • (label, number): object
          • Parameters

            • label: string
            • number: number

            Returns object

      • Optional bindings?: ((bindings) => object)
          • (bindings): object
          • Parameters

            Returns object

      • Optional log?: ((object) => object)
          • (object): object
          • Parameters

            • object: object

            Returns object

      redact?: string[] | redactOptions
      msgPrefix?: string

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.ChildLoggerOptions.html b/interfaces/index._internal_.ChildLoggerOptions.html new file mode 100644 index 0000000..b01bc33 --- /dev/null +++ b/interfaces/index._internal_.ChildLoggerOptions.html @@ -0,0 +1,7 @@ +ChildLoggerOptions | @foxxmd/logging Docs

      Interface ChildLoggerOptions<CustomLevels>

      interface ChildLoggerOptions<CustomLevels> {
          level?: LevelOrString;
          serializers?: {
              [key: string]: SerializerFn;
          };
          customLevels?: {
              [level in string]: number
          };
          formatters?: {
              level?: ((label, number) => object);
              bindings?: ((bindings) => object);
              log?: ((object) => object);
          };
          redact?: string[] | redactOptions;
          msgPrefix?: string;
      }

      Type Parameters

      • CustomLevels extends string = never

      Hierarchy (view full)

      Properties

      serializers?: {
          [key: string]: SerializerFn;
      }

      Type declaration

      customLevels?: {
          [level in string]: number
      }
      formatters?: {
          level?: ((label, number) => object);
          bindings?: ((bindings) => object);
          log?: ((object) => object);
      }

      Type declaration

      • Optional level?: ((label, number) => object)
          • (label, number): object
          • Parameters

            • label: string
            • number: number

            Returns object

      • Optional bindings?: ((bindings) => object)
          • (bindings): object
          • Parameters

            Returns object

      • Optional log?: ((object) => object)
          • (object): object
          • Parameters

            • object: object

            Returns object

      redact?: string[] | redactOptions
      msgPrefix?: string

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.DestinationStream.html b/interfaces/index._internal_.DestinationStream.html new file mode 100644 index 0000000..c2e27c8 --- /dev/null +++ b/interfaces/index._internal_.DestinationStream.html @@ -0,0 +1,2 @@ +DestinationStream | @foxxmd/logging Docs
      interface DestinationStream {
          write(msg): void;
      }

      Hierarchy (view full)

      Methods

      Methods

      • Parameters

        • msg: string

        Returns void

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.EventEmitter-1.Abortable.html b/interfaces/index._internal_.EventEmitter-1.Abortable.html new file mode 100644 index 0000000..33265b0 --- /dev/null +++ b/interfaces/index._internal_.EventEmitter-1.Abortable.html @@ -0,0 +1,3 @@ +Abortable | @foxxmd/logging Docs
      interface Abortable {
          signal?: AbortSignal;
      }

      Properties

      Properties

      signal?: AbortSignal

      When provided the corresponding AbortController can be used to cancel an asynchronous action.

      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.EventEmitter-1.EventEmitterAsyncResourceOptions.html b/interfaces/index._internal_.EventEmitter-1.EventEmitterAsyncResourceOptions.html new file mode 100644 index 0000000..247a4c3 --- /dev/null +++ b/interfaces/index._internal_.EventEmitter-1.EventEmitterAsyncResourceOptions.html @@ -0,0 +1,19 @@ +EventEmitterAsyncResourceOptions | @foxxmd/logging Docs
      interface EventEmitterAsyncResourceOptions {
          triggerAsyncId?: number;
          requireManualDestroy?: boolean;
          captureRejections?: boolean;
          name?: string;
      }

      Hierarchy (view full)

      Properties

      triggerAsyncId?: number

      The ID of the execution context that created this async event.

      +

      Default

      executionAsyncId()
      +
      +
      requireManualDestroy?: boolean

      Disables automatic emitDestroy when the object is garbage collected. +This usually does not need to be set (even if emitDestroy is called +manually), unless the resource's asyncId is retrieved and the +sensitive API's emitDestroy is called with it.

      +

      Default

      false
      +
      +
      captureRejections?: boolean

      Enables automatic capturing of promise rejection.

      +
      name?: string

      The type of async event, this is required when instantiating EventEmitterAsyncResource +directly rather than as a child class.

      +

      Default

      new.target.name if instantiated as a child class.
      +
      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.EventEmitter-1.EventEmitterReferencingAsyncResource.html b/interfaces/index._internal_.EventEmitter-1.EventEmitterReferencingAsyncResource.html new file mode 100644 index 0000000..7f9d6d0 --- /dev/null +++ b/interfaces/index._internal_.EventEmitter-1.EventEmitterReferencingAsyncResource.html @@ -0,0 +1,34 @@ +EventEmitterReferencingAsyncResource | @foxxmd/logging Docs

      The class AsyncResource is designed to be extended by the embedder's async +resources. Using this, users can easily trigger the lifetime events of their +own resources.

      +

      The init hook will trigger when an AsyncResource is instantiated.

      +

      The following is an overview of the AsyncResource API.

      +
      import { AsyncResource, executionAsyncId } from 'async_hooks';

      // AsyncResource() is meant to be extended. Instantiating a
      // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
      // async_hook.executionAsyncId() is used.
      const asyncResource = new AsyncResource(
      type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }
      );

      // Run a function in the execution context of the resource. This will
      // * establish the context of the resource
      // * trigger the AsyncHooks before callbacks
      // * call the provided function `fn` with the supplied arguments
      // * trigger the AsyncHooks after callbacks
      // * restore the original execution context
      asyncResource.runInAsyncScope(fn, thisArg, ...args);

      // Call AsyncHooks destroy callbacks.
      asyncResource.emitDestroy();

      // Return the unique ID assigned to the AsyncResource instance.
      asyncResource.asyncId();

      // Return the trigger ID for the AsyncResource instance.
      asyncResource.triggerAsyncId(); +
      +
      interface EventEmitterReferencingAsyncResource {
          bind<Func>(fn): Func & {
              asyncResource: AsyncResource;
          };
          runInAsyncScope<This, Result>(fn, thisArg?, ...args): Result;
          emitDestroy(): this;
          asyncId(): number;
          triggerAsyncId(): number;
          eventEmitter: EventEmitterAsyncResource;
      }

      Hierarchy (view full)

      Properties

      Methods

      • Binds the given function to execute to this AsyncResource's scope.

        +

        The returned function will have an asyncResource property referencing +the AsyncResource to which the function is bound.

        +

        Type Parameters

        • Func extends ((...args) => any)

        Parameters

        • fn: Func

          The function to bind to the current AsyncResource.

          +

        Returns Func & {
            asyncResource: AsyncResource;
        }

        Since

        v14.8.0, v12.19.0

        +
      • Call the provided function with the provided arguments in the execution context +of the async resource. This will establish the context, trigger the AsyncHooks +before callbacks, call the function, trigger the AsyncHooks after callbacks, and +then restore the original execution context.

        +

        Type Parameters

        • This
        • Result

        Parameters

        • fn: ((this, ...args) => Result)

          The function to call in the execution context of this async resource.

          +
        • Optional thisArg: This

          The receiver to be used for the function call.

          +
        • Rest ...args: any[]

          Optional arguments to pass to the function.

          +

        Returns Result

        Since

        v9.6.0

        +
      • Call all destroy hooks. This should only ever be called once. An error will +be thrown if it is called more than once. This must be manually called. If +the resource is left to be collected by the GC then the destroy hooks will +never be called.

        +

        Returns this

        A reference to asyncResource.

        +
      • Returns number

        The unique asyncId assigned to the resource.

        +
      • Returns number

        The same triggerAsyncId that is passed to the AsyncResource constructor.

        +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.EventEmitterOptions.html b/interfaces/index._internal_.EventEmitterOptions.html new file mode 100644 index 0000000..b207c49 --- /dev/null +++ b/interfaces/index._internal_.EventEmitterOptions.html @@ -0,0 +1,3 @@ +EventEmitterOptions | @foxxmd/logging Docs
      interface EventEmitterOptions {
          captureRejections?: boolean;
      }

      Hierarchy (view full)

      Properties

      Properties

      captureRejections?: boolean

      Enables automatic capturing of promise rejection.

      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.IteratorReturnResult.html b/interfaces/index._internal_.IteratorReturnResult.html new file mode 100644 index 0000000..70b34f7 --- /dev/null +++ b/interfaces/index._internal_.IteratorReturnResult.html @@ -0,0 +1,3 @@ +IteratorReturnResult | @foxxmd/logging Docs

      Interface IteratorReturnResult<TReturn>

      interface IteratorReturnResult<TReturn> {
          done: true;
          value: TReturn;
      }

      Type Parameters

      • TReturn

      Properties

      Properties

      done: true
      value: TReturn

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.IteratorYieldResult.html b/interfaces/index._internal_.IteratorYieldResult.html new file mode 100644 index 0000000..24cc1da --- /dev/null +++ b/interfaces/index._internal_.IteratorYieldResult.html @@ -0,0 +1,3 @@ +IteratorYieldResult | @foxxmd/logging Docs

      Interface IteratorYieldResult<TYield>

      interface IteratorYieldResult<TYield> {
          done?: false;
          value: TYield;
      }

      Type Parameters

      • TYield

      Properties

      Properties

      done?: false
      value: TYield

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.LevelMapping.html b/interfaces/index._internal_.LevelMapping.html new file mode 100644 index 0000000..837127e --- /dev/null +++ b/interfaces/index._internal_.LevelMapping.html @@ -0,0 +1,5 @@ +LevelMapping | @foxxmd/logging Docs
      interface LevelMapping {
          values: {
              [level: string]: number;
          };
          labels: {
              [level: number]: string;
          };
      }

      Properties

      Properties

      values: {
          [level: string]: number;
      }

      Returns the mappings of level names to their respective internal number representation.

      +

      Type declaration

      • [level: string]: number
      labels: {
          [level: number]: string;
      }

      Returns the mappings of level internal level numbers to their string representations.

      +

      Type declaration

      • [level: number]: string

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.LogFn-1.html b/interfaces/index._internal_.LogFn-1.html new file mode 100644 index 0000000..cec7c34 --- /dev/null +++ b/interfaces/index._internal_.LogFn-1.html @@ -0,0 +1 @@ +LogFn | @foxxmd/logging Docs
      interface LogFn {
          <T>(obj, msg?, ...args): void;
          (obj, msg?, ...args): void;
          (msg, ...args): void;
      }

      Hierarchy (view full)

      • Type Parameters

        • T extends object

        Parameters

        • obj: T
        • Optional msg: string
        • Rest ...args: any[]

        Returns void

      • Parameters

        • obj: unknown
        • Optional msg: string
        • Rest ...args: any[]

        Returns void

      • Parameters

        • msg: string
        • Rest ...args: any[]

        Returns void

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.LogFn.html b/interfaces/index._internal_.LogFn.html new file mode 100644 index 0000000..8786494 --- /dev/null +++ b/interfaces/index._internal_.LogFn.html @@ -0,0 +1 @@ +LogFn | @foxxmd/logging Docs
      interface LogFn {
          <T>(obj, msg?, ...args): void;
          (obj, msg?, ...args): void;
          (msg, ...args): void;
      }

      Hierarchy (view full)

      • Type Parameters

        • T extends object

        Parameters

        • obj: T
        • Optional msg: string
        • Rest ...args: any[]

        Returns void

      • Parameters

        • obj: unknown
        • Optional msg: string
        • Rest ...args: any[]

        Returns void

      • Parameters

        • msg: string
        • Rest ...args: any[]

        Returns void

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.LoggerExtras.html b/interfaces/index._internal_.LoggerExtras.html new file mode 100644 index 0000000..02b2717 --- /dev/null +++ b/interfaces/index._internal_.LoggerExtras.html @@ -0,0 +1,155 @@ +LoggerExtras | @foxxmd/logging Docs

      Interface LoggerExtras<CustomLevels>

      The EventEmitter class is defined and exposed by the events module:

      +
      const EventEmitter = require('events');
      +
      +

      All EventEmitters emit the event 'newListener' when new listeners are +added and 'removeListener' when existing listeners are removed.

      +

      It supports the following option:

      +

      Since

      v0.1.26

      +
      interface LoggerExtras<CustomLevels> {
          [captureRejectionSymbol]?<K>(error, event, ...args): void;
          off<K>(eventName, listener): this;
          removeAllListeners(event?): this;
          setMaxListeners(n): this;
          getMaxListeners(): number;
          listeners<K>(eventName): Function[];
          rawListeners<K>(eventName): Function[];
          emit<K>(eventName, ...args): boolean;
          listenerCount<K>(eventName, listener?): number;
          eventNames(): (string | symbol)[];
          version: string;
          levels: LevelMapping;
          useLevelLabels: boolean;
          customLevels: {
              [level in string]: number
          };
          useOnlyCustomLevels: boolean;
          levelVal: number;
          child<ChildCustomLevels>(bindings, options?): Logger<CustomLevels | ChildCustomLevels>;
          onChild: OnChildCallback<CustomLevels>;
          on(event, listener): this;
          addListener(event, listener): this;
          once(event, listener): this;
          prependListener(event, listener): this;
          prependOnceListener(event, listener): this;
          removeListener(event, listener): this;
          isLevelEnabled(level): boolean;
          bindings(): Bindings;
          setBindings(bindings): void;
          flush(cb?): void;
      }

      Type Parameters

      • CustomLevels extends string = never

      Hierarchy (view full)

      Properties

      version: string

      Exposes the Pino package version. Also available on the exported pino function.

      +
      levels: LevelMapping
      useLevelLabels: boolean

      Outputs the level as a string instead of integer.

      +
      customLevels: {
          [level in string]: number
      }

      Define additional logging levels.

      +
      useOnlyCustomLevels: boolean

      Use only defined customLevels and omit Pino's levels.

      +
      levelVal: number

      Returns the integer value for the logger instance's logging level.

      +

      This can be used to modify the callback function on creation of a new child.

      +

      Methods

      • Type Parameters

        • K

        Parameters

        • error: Error
        • event: string | symbol
        • Rest ...args: AnyRest

        Returns void

      • Alias for emitter.removeListener().

        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol
        • listener: ((...args) => void)
            • (...args): void
            • Parameters

              • Rest ...args: any[]

              Returns void

        Returns this

        Since

        v10.0.0

        +
      • Removes all listeners, or those of the specified eventName.

        +

        It is bad practice to remove listeners added elsewhere in the code, +particularly when the EventEmitter instance was created by some other +component or module (e.g. sockets or file streams).

        +

        Returns a reference to the EventEmitter, so that calls can be chained.

        +

        Parameters

        • Optional event: string | symbol

        Returns this

        Since

        v0.1.26

        +
      • By default EventEmitters will print a warning if more than 10 listeners are +added for a particular event. This is a useful default that helps finding +memory leaks. The emitter.setMaxListeners() method allows the limit to be +modified for this specific EventEmitter instance. The value can be set toInfinity (or 0) to indicate an unlimited number of listeners.

        +

        Returns a reference to the EventEmitter, so that calls can be chained.

        +

        Parameters

        • n: number

        Returns this

        Since

        v0.3.5

        +
      • Returns the current max listener value for the EventEmitter which is either +set by emitter.setMaxListeners(n) or defaults to defaultMaxListeners.

        +

        Returns number

        Since

        v1.0.0

        +
      • Returns a copy of the array of listeners for the event named eventName.

        +
        server.on('connection', (stream) => {
        console.log('someone connected!');
        });
        console.log(util.inspect(server.listeners('connection')));
        // Prints: [ [Function] ] +
        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol

        Returns Function[]

        Since

        v0.1.26

        +
      • Returns a copy of the array of listeners for the event named eventName, +including any wrappers (such as those created by .once()).

        +
        const emitter = new EventEmitter();
        emitter.once('log', () => console.log('log once'));

        // Returns a new Array with a function `onceWrapper` which has a property
        // `listener` which contains the original listener bound above
        const listeners = emitter.rawListeners('log');
        const logFnWrapper = listeners[0];

        // Logs "log once" to the console and does not unbind the `once` event
        logFnWrapper.listener();

        // Logs "log once" to the console and removes the listener
        logFnWrapper();

        emitter.on('log', () => console.log('log persistently'));
        // Will return a new Array with a single function bound by `.on()` above
        const newListeners = emitter.rawListeners('log');

        // Logs "log persistently" twice
        newListeners[0]();
        emitter.emit('log'); +
        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol

        Returns Function[]

        Since

        v9.4.0

        +
      • Synchronously calls each of the listeners registered for the event namedeventName, in the order they were registered, passing the supplied arguments +to each.

        +

        Returns true if the event had listeners, false otherwise.

        +
        const EventEmitter = require('events');
        const myEmitter = new EventEmitter();

        // First listener
        myEmitter.on('event', function firstListener() {
        console.log('Helloooo! first listener');
        });
        // Second listener
        myEmitter.on('event', function secondListener(arg1, arg2) {
        console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
        });
        // Third listener
        myEmitter.on('event', function thirdListener(...args) {
        const parameters = args.join(', ');
        console.log(`event with parameters ${parameters} in third listener`);
        });

        console.log(myEmitter.listeners('event'));

        myEmitter.emit('event', 1, 2, 3, 4, 5);

        // Prints:
        // [
        // [Function: firstListener],
        // [Function: secondListener],
        // [Function: thirdListener]
        // ]
        // Helloooo! first listener
        // event with parameters 1, 2 in second listener
        // event with parameters 1, 2, 3, 4, 5 in third listener +
        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol
        • Rest ...args: AnyRest

        Returns boolean

        Since

        v0.1.26

        +
      • Returns the number of listeners listening to the event named eventName.

        +

        If listener is provided, it will return how many times the listener +is found in the list of the listeners of the event.

        +

        Type Parameters

        • K

        Parameters

        • eventName: string | symbol

          The name of the event being listened for

          +
        • Optional listener: Function

          The event handler function

          +

        Returns number

        Since

        v3.2.0

        +
      • Returns an array listing the events for which the emitter has registered +listeners. The values in the array are strings or Symbols.

        +
        const EventEmitter = require('events');
        const myEE = new EventEmitter();
        myEE.on('foo', () => {});
        myEE.on('bar', () => {});

        const sym = Symbol('symbol');
        myEE.on(sym, () => {});

        console.log(myEE.eventNames());
        // Prints: [ 'foo', 'bar', Symbol(symbol) ] +
        +

        Returns (string | symbol)[]

        Since

        v6.0.0

        +
      • Creates a child logger, setting all key-value pairs in bindings as properties in the log lines. All serializers will be applied to the given pair. +Child loggers use the same output stream as the parent and inherit the current log level of the parent at the time they are spawned. +From v2.x.x the log level of a child is mutable (whereas in v1.x.x it was immutable), and can be set independently of the parent. +If a level property is present in the object passed to child it will override the child logger level.

        +

        Type Parameters

        • ChildCustomLevels extends string = never

        Parameters

        Returns Logger<CustomLevels | ChildCustomLevels>

        a child logger instance.

        +
      • Registers a listener function that is triggered when the level is changed. +Note: When browserified, this functionality will only be available if the events module has been required elsewhere +(e.g. if you're using streams in the browser). This allows for a trade-off between bundle size and functionality.

        +

        Parameters

        Returns this

      • Adds a one-timelistener function for the event named eventName. The +next time eventName is triggered, this listener is removed and then invoked.

        +
        server.once('connection', (stream) => {
        console.log('Ah, we have our first user!');
        }); +
        +

        Returns a reference to the EventEmitter, so that calls can be chained.

        +

        By default, event listeners are invoked in the order they are added. Theemitter.prependOnceListener() method can be used as an alternative to add the +event listener to the beginning of the listeners array.

        +
        const myEE = new EventEmitter();
        myEE.once('foo', () => console.log('a'));
        myEE.prependOnceListener('foo', () => console.log('b'));
        myEE.emit('foo');
        // Prints:
        // b
        // a +
        +

        Parameters

        Returns this

        Since

        v0.3.0

        +
      • Adds the listener function to the beginning of the listeners array for the +event named eventName. No checks are made to see if the listener has +already been added. Multiple calls passing the same combination of eventNameand listener will result in the listener being added, and called, multiple +times.

        +
        server.prependListener('connection', (stream) => {
        console.log('someone connected!');
        }); +
        +

        Returns a reference to the EventEmitter, so that calls can be chained.

        +

        Parameters

        Returns this

        Since

        v6.0.0

        +
      • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +listener is removed, and then invoked.

        +
        server.prependOnceListener('connection', (stream) => {
        console.log('Ah, we have our first user!');
        }); +
        +

        Returns a reference to the EventEmitter, so that calls can be chained.

        +

        Parameters

        Returns this

        Since

        v6.0.0

        +
      • Removes the specified listener from the listener array for the event namedeventName.

        +
        const callback = (stream) => {
        console.log('someone connected!');
        };
        server.on('connection', callback);
        // ...
        server.removeListener('connection', callback); +
        +

        removeListener() will remove, at most, one instance of a listener from the +listener array. If any single listener has been added multiple times to the +listener array for the specified eventName, then removeListener() must be +called multiple times to remove each instance.

        +

        Once an event is emitted, all listeners attached to it at the +time of emitting are called in order. This implies that anyremoveListener() or removeAllListeners() calls after emitting and before the last listener finishes execution +will not remove them fromemit() in progress. Subsequent events behave as expected.

        +
        const myEmitter = new MyEmitter();

        const callbackA = () => {
        console.log('A');
        myEmitter.removeListener('event', callbackB);
        };

        const callbackB = () => {
        console.log('B');
        };

        myEmitter.on('event', callbackA);

        myEmitter.on('event', callbackB);

        // callbackA removes listener callbackB but it will still be called.
        // Internal listener array at time of emit [callbackA, callbackB]
        myEmitter.emit('event');
        // Prints:
        // A
        // B

        // callbackB is now removed.
        // Internal listener array [callbackA]
        myEmitter.emit('event');
        // Prints:
        // A +
        +

        Because listeners are managed using an internal array, calling this will +change the position indices of any listener registered after the listener +being removed. This will not impact the order in which listeners are called, +but it means that any copies of the listener array as returned by +the emitter.listeners() method will need to be recreated.

        +

        When a single function has been added as a handler multiple times for a single +event (as in the example below), removeListener() will remove the most +recently added instance. In the example the once('ping')listener is removed:

        +
        const ee = new EventEmitter();

        function pong() {
        console.log('pong');
        }

        ee.on('ping', pong);
        ee.once('ping', pong);
        ee.removeListener('ping', pong);

        ee.emit('ping');
        ee.emit('ping'); +
        +

        Returns a reference to the EventEmitter, so that calls can be chained.

        +

        Parameters

        Returns this

        Since

        v0.1.26

        +
      • A utility method for determining if a given log level will write to the destination.

        +

        Parameters

        Returns boolean

      • Returns an object containing all the current bindings, cloned from the ones passed in via logger.child().

        +

        Returns Bindings

      • Adds to the bindings of this logger instance. +Note: Does not overwrite bindings. Can potentially result in duplicate keys in log lines.

        +

        Parameters

        Returns void

      • Flushes the content of the buffer when using pino.destination({ sync: false }). +call the callback when finished

        +

        Parameters

        • Optional cb: ((err?) => void)
            • (err?): void
            • Parameters

              • Optional err: Error

              Returns void

        Returns void

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.PromiseLike.html b/interfaces/index._internal_.PromiseLike.html new file mode 100644 index 0000000..1f168f4 --- /dev/null +++ b/interfaces/index._internal_.PromiseLike.html @@ -0,0 +1,6 @@ +PromiseLike | @foxxmd/logging Docs
      interface PromiseLike<T> {
          then<TResult1, TResult2>(onfulfilled?, onrejected?): PromiseLike<TResult1 | TResult2>;
      }

      Type Parameters

      • T

      Methods

      Methods

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.StaticEventEmitterOptions.html b/interfaces/index._internal_.StaticEventEmitterOptions.html new file mode 100644 index 0000000..2a59a25 --- /dev/null +++ b/interfaces/index._internal_.StaticEventEmitterOptions.html @@ -0,0 +1,2 @@ +StaticEventEmitterOptions | @foxxmd/logging Docs
      interface StaticEventEmitterOptions {
          signal?: AbortSignal;
      }

      Properties

      Properties

      signal?: AbortSignal

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.StreamEntry-1.html b/interfaces/index._internal_.StreamEntry-1.html new file mode 100644 index 0000000..2da1b42 --- /dev/null +++ b/interfaces/index._internal_.StreamEntry-1.html @@ -0,0 +1,3 @@ +StreamEntry | @foxxmd/logging Docs
      interface StreamEntry<TLevel> {
          stream: DestinationStream;
          level?: TLevel;
      }

      Type Parameters

      Hierarchy (view full)

      Properties

      Properties

      level?: TLevel

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.StreamEntry.html b/interfaces/index._internal_.StreamEntry.html new file mode 100644 index 0000000..7d2e743 --- /dev/null +++ b/interfaces/index._internal_.StreamEntry.html @@ -0,0 +1,3 @@ +StreamEntry | @foxxmd/logging Docs
      interface StreamEntry<TLevel> {
          stream: DestinationStream;
          level?: TLevel;
      }

      Type Parameters

      Hierarchy (view full)

      Properties

      Properties

      level?: TLevel

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_._DOMEventTarget.html b/interfaces/index._internal_._DOMEventTarget.html new file mode 100644 index 0000000..41c4fdf --- /dev/null +++ b/interfaces/index._internal_._DOMEventTarget.html @@ -0,0 +1,2 @@ +_DOMEventTarget | @foxxmd/logging Docs
      interface _DOMEventTarget {
          addEventListener(eventName, listener, opts?): any;
      }

      Methods

      • Parameters

        • eventName: string
        • listener: ((...args) => void)
            • (...args): void
            • Parameters

              • Rest ...args: any[]

              Returns void

        • Optional opts: {
              once: boolean;
          }
          • once: boolean

        Returns any

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_._NodeEventTarget.html b/interfaces/index._internal_._NodeEventTarget.html new file mode 100644 index 0000000..704d39e --- /dev/null +++ b/interfaces/index._internal_._NodeEventTarget.html @@ -0,0 +1,2 @@ +_NodeEventTarget | @foxxmd/logging Docs
      interface _NodeEventTarget {
          once(eventName, listener): this;
      }

      Methods

      Methods

      • Parameters

        • eventName: string | symbol
        • listener: ((...args) => void)
            • (...args): void
            • Parameters

              • Rest ...args: any[]

              Returns void

        Returns this

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/index._internal_.redactOptions.html b/interfaces/index._internal_.redactOptions.html new file mode 100644 index 0000000..c0eaea1 --- /dev/null +++ b/interfaces/index._internal_.redactOptions.html @@ -0,0 +1,4 @@ +redactOptions | @foxxmd/logging Docs
      interface redactOptions {
          paths: string[];
          censor?: string | ((value, path) => any);
          remove?: boolean;
      }

      Properties

      Properties

      paths: string[]
      censor?: string | ((value, path) => any)

      Type declaration

        • (value, path): any
        • Parameters

          • value: any
          • path: string[]

          Returns any

      remove?: boolean

      Generated using TypeDoc

      \ No newline at end of file diff --git a/media/example.png b/media/example.png new file mode 100644 index 0000000..a9bbfd7 Binary files /dev/null and b/media/example.png differ diff --git a/modules/factory._internal_.html b/modules/factory._internal_.html new file mode 100644 index 0000000..85647e4 --- /dev/null +++ b/modules/factory._internal_.html @@ -0,0 +1,15 @@ +<internal> | @foxxmd/logging Docs

      Generated using TypeDoc

      \ No newline at end of file diff --git a/modules/factory.html b/modules/factory.html index 57da2c3..e9e14ae 100644 --- a/modules/factory.html +++ b/modules/factory.html @@ -1,4 +1,7 @@ -factory | @foxxmd/logging Docs

      Index

      Variables

      prettyConsole +factory | @foxxmd/logging Docs

      Index

      Modules

      Type Aliases

      Variables

      Functions

      buildDestinationRollingFile buildDestinationFile diff --git a/modules/index._internal_.EventEmitter-1.html b/modules/index._internal_.EventEmitter-1.html new file mode 100644 index 0000000..b124c08 --- /dev/null +++ b/modules/index._internal_.EventEmitter-1.html @@ -0,0 +1,6 @@ +EventEmitter | @foxxmd/logging Docs

      References

      Re-exports EventEmitter

      Generated using TypeDoc

      \ No newline at end of file diff --git a/modules/index._internal_.html b/modules/index._internal_.html new file mode 100644 index 0000000..76b5006 --- /dev/null +++ b/modules/index._internal_.html @@ -0,0 +1,49 @@ +<internal> | @foxxmd/logging Docs

      Generated using TypeDoc

      \ No newline at end of file diff --git a/modules/index.html b/modules/index.html index c1b05af..928f288 100644 --- a/modules/index.html +++ b/modules/index.html @@ -1,4 +1,5 @@ -index | @foxxmd/logging Docs

      Index

      Interfaces

      LogOptions +index | @foxxmd/logging Docs

      Index

      Modules

      Interfaces

      Type Aliases

      LogLevel Logger LogLevelStreamEntry diff --git a/types/factory.FileDestination.html b/types/factory.FileDestination.html new file mode 100644 index 0000000..c61b066 --- /dev/null +++ b/types/factory.FileDestination.html @@ -0,0 +1 @@ +FileDestination | @foxxmd/logging Docs
      FileDestination: Omit<PrettyOptions_, "destination" | "sync"> & {
          path: string | (() => string);
      }

      Type declaration

      • path: string | (() => string)

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/factory.StreamDestination.html b/types/factory.StreamDestination.html new file mode 100644 index 0000000..0d1791d --- /dev/null +++ b/types/factory.StreamDestination.html @@ -0,0 +1 @@ +StreamDestination | @foxxmd/logging Docs
      StreamDestination: Omit<PrettyOptions_, "destination"> & {
          destination: number | DestinationStream | WritableStream;
      }

      Type declaration

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/factory._internal_.BufferEncoding.html b/types/factory._internal_.BufferEncoding.html new file mode 100644 index 0000000..14aff5a --- /dev/null +++ b/types/factory._internal_.BufferEncoding.html @@ -0,0 +1 @@ +BufferEncoding | @foxxmd/logging Docs
      BufferEncoding: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "base64url" | "latin1" | "binary" | "hex"

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/factory._internal_.Color.html b/types/factory._internal_.Color.html new file mode 100644 index 0000000..542aa53 --- /dev/null +++ b/types/factory._internal_.Color.html @@ -0,0 +1 @@ +Color | @foxxmd/logging Docs
      Color: ((text) => string)

      Type declaration

        • (text): string
        • Parameters

          • text: string | number

          Returns string

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/factory._internal_.Exclude.html b/types/factory._internal_.Exclude.html new file mode 100644 index 0000000..f770e28 --- /dev/null +++ b/types/factory._internal_.Exclude.html @@ -0,0 +1,2 @@ +Exclude | @foxxmd/logging Docs
      Exclude<T, U>: T extends U
          ? never
          : T

      Exclude from T those types that are assignable to U

      +

      Type Parameters

      • T
      • U

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/factory._internal_.LevelPrettifierExtras.html b/types/factory._internal_.LevelPrettifierExtras.html new file mode 100644 index 0000000..5d0b9a5 --- /dev/null +++ b/types/factory._internal_.LevelPrettifierExtras.html @@ -0,0 +1 @@ +LevelPrettifierExtras | @foxxmd/logging Docs
      LevelPrettifierExtras: {
          label: string;
          labelColorized: string;
      }

      Type declaration

      • label: string
      • labelColorized: string

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/factory._internal_.LogDescriptor.html b/types/factory._internal_.LogDescriptor.html new file mode 100644 index 0000000..15626d7 --- /dev/null +++ b/types/factory._internal_.LogDescriptor.html @@ -0,0 +1 @@ +LogDescriptor | @foxxmd/logging Docs
      LogDescriptor: Record<string, unknown>

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/factory._internal_.MessageFormatFunc.html b/types/factory._internal_.MessageFormatFunc.html new file mode 100644 index 0000000..328d2a0 --- /dev/null +++ b/types/factory._internal_.MessageFormatFunc.html @@ -0,0 +1 @@ +MessageFormatFunc | @foxxmd/logging Docs
      MessageFormatFunc: ((log, messageKey, levelLabel, extras) => string)

      Type declaration

        • (log, messageKey, levelLabel, extras): string
        • Parameters

          Returns string

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/factory._internal_.Omit.html b/types/factory._internal_.Omit.html new file mode 100644 index 0000000..772f724 --- /dev/null +++ b/types/factory._internal_.Omit.html @@ -0,0 +1,2 @@ +Omit | @foxxmd/logging Docs
      Omit<T, K>: Pick<T, Exclude<keyof T, K>>

      Construct a type with the properties of T except for those in type K.

      +

      Type Parameters

      • T
      • K extends keyof any

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/factory._internal_.Pick.html b/types/factory._internal_.Pick.html new file mode 100644 index 0000000..6df148c --- /dev/null +++ b/types/factory._internal_.Pick.html @@ -0,0 +1,2 @@ +Pick | @foxxmd/logging Docs
      Pick<T, K>: {
          [P in K]: T[P]
      }

      From T, pick a set of properties whose keys are in the union K

      +

      Type Parameters

      • T
      • K extends keyof T

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/factory._internal_.Prettifier.html b/types/factory._internal_.Prettifier.html new file mode 100644 index 0000000..fac3fed --- /dev/null +++ b/types/factory._internal_.Prettifier.html @@ -0,0 +1 @@ +Prettifier | @foxxmd/logging Docs
      Prettifier<T>: ((inputData, key, log, extras) => string)

      Type Parameters

      • T = object

      Type declaration

        • (inputData, key, log, extras): string
        • Parameters

          Returns string

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/factory._internal_.PrettifierExtras.html b/types/factory._internal_.PrettifierExtras.html new file mode 100644 index 0000000..999abea --- /dev/null +++ b/types/factory._internal_.PrettifierExtras.html @@ -0,0 +1 @@ +PrettifierExtras | @foxxmd/logging Docs
      PrettifierExtras<T>: {
          colors: Colorette;
      } & T

      Type Parameters

      • T = object

      Type declaration

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index.LogData.html b/types/index.LogData.html index 8f61c1d..c46b85c 100644 --- a/types/index.LogData.html +++ b/types/index.LogData.html @@ -1 +1 @@ -LogData | @foxxmd/logging Docs
      LogData: Record<string, any> & {
          level: number;
          time: number;
          pid: number;
          hostname: string;
          labels: any[];
          msg: string | Error | ErrorWithCause;
      }

      Type declaration

      • level: number
      • time: number
      • pid: number
      • hostname: string
      • labels: any[]
      • msg: string | Error | ErrorWithCause

      Generated using TypeDoc

      \ No newline at end of file +LogData | @foxxmd/logging Docs
      LogData: Record<string, any> & {
          level: number;
          time: number;
          pid: number;
          hostname: string;
          labels: any[];
          msg: string | Error | ErrorWithCause;
      }

      Type declaration

      • level: number
      • time: number
      • pid: number
      • hostname: string
      • labels: any[]
      • msg: string | Error | ErrorWithCause

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index.LogLevel.html b/types/index.LogLevel.html index 2fff266..ad999ba 100644 --- a/types/index.LogLevel.html +++ b/types/index.LogLevel.html @@ -1 +1 @@ -LogLevel | @foxxmd/logging Docs
      LogLevel: typeof LOG_LEVELS[number]

      Generated using TypeDoc

      \ No newline at end of file +LogLevel | @foxxmd/logging Docs
      LogLevel: typeof LOG_LEVELS[number]

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index.LogLevelStreamEntry.html b/types/index.LogLevelStreamEntry.html index a0f0bba..a378a4d 100644 --- a/types/index.LogLevelStreamEntry.html +++ b/types/index.LogLevelStreamEntry.html @@ -1 +1 @@ -LogLevelStreamEntry | @foxxmd/logging Docs

      Type alias LogLevelStreamEntry

      LogLevelStreamEntry: StreamEntry<LogLevel>

      Generated using TypeDoc

      \ No newline at end of file +LogLevelStreamEntry | @foxxmd/logging Docs

      Type alias LogLevelStreamEntry

      LogLevelStreamEntry: StreamEntry<LogLevel>

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index.Logger.html b/types/index.Logger.html index 25687e7..44a38e6 100644 --- a/types/index.Logger.html +++ b/types/index.Logger.html @@ -1 +1 @@ -Logger | @foxxmd/logging Docs
      Logger: PinoLogger<LogLevel> & {
          labels: any[];
          addLabel: ((value) => void);
      }

      Type declaration

      • labels: any[]
      • addLabel: ((value) => void)
          • (value): void
          • Parameters

            • value: any

            Returns void

      Generated using TypeDoc

      \ No newline at end of file +Logger | @foxxmd/logging Docs
      Logger: Logger<LogLevel> & {
          labels: any[];
          addLabel: ((value) => void);
      }

      Type declaration

      • labels: any[]
      • addLabel: ((value) => void)
          • (value): void
          • Parameters

            • value: any

            Returns void

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.AnyRest.html b/types/index._internal_.AnyRest.html new file mode 100644 index 0000000..02bbdeb --- /dev/null +++ b/types/index._internal_.AnyRest.html @@ -0,0 +1 @@ +AnyRest | @foxxmd/logging Docs
      AnyRest: [args: any[]]

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.Args.html b/types/index._internal_.Args.html new file mode 100644 index 0000000..5924b21 --- /dev/null +++ b/types/index._internal_.Args.html @@ -0,0 +1 @@ +Args | @foxxmd/logging Docs
      Args<K, T>: T extends DefaultEventMap
          ? AnyRest
          : K extends keyof T
              ? T[K]
              : never

      Type Parameters

      • K
      • T

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.Bindings.html b/types/index._internal_.Bindings.html new file mode 100644 index 0000000..f442563 --- /dev/null +++ b/types/index._internal_.Bindings.html @@ -0,0 +1 @@ +Bindings | @foxxmd/logging Docs
      Bindings: Record<string, any>

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.CustomLevelLogger.html b/types/index._internal_.CustomLevelLogger.html new file mode 100644 index 0000000..2d49f47 --- /dev/null +++ b/types/index._internal_.CustomLevelLogger.html @@ -0,0 +1 @@ +CustomLevelLogger | @foxxmd/logging Docs

      Type alias CustomLevelLogger<CustomLevels>

      CustomLevelLogger<CustomLevels>: {
          [level in CustomLevels]: LogFn
      }

      Type Parameters

      • CustomLevels extends string

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.DefaultEventMap.html b/types/index._internal_.DefaultEventMap.html new file mode 100644 index 0000000..82fa25f --- /dev/null +++ b/types/index._internal_.DefaultEventMap.html @@ -0,0 +1 @@ +DefaultEventMap | @foxxmd/logging Docs
      DefaultEventMap: [never]

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.EventMap.html b/types/index._internal_.EventMap.html new file mode 100644 index 0000000..1b3867a --- /dev/null +++ b/types/index._internal_.EventMap.html @@ -0,0 +1 @@ +EventMap | @foxxmd/logging Docs
      EventMap<T>: Record<keyof T, any[]> | DefaultEventMap

      Type Parameters

      • T

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.IteratorResult.html b/types/index._internal_.IteratorResult.html new file mode 100644 index 0000000..0f4841e --- /dev/null +++ b/types/index._internal_.IteratorResult.html @@ -0,0 +1 @@ +IteratorResult | @foxxmd/logging Docs

      Type alias IteratorResult<T, TReturn>

      Type Parameters

      • T
      • TReturn = any

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.Key.html b/types/index._internal_.Key.html new file mode 100644 index 0000000..1509d41 --- /dev/null +++ b/types/index._internal_.Key.html @@ -0,0 +1 @@ +Key | @foxxmd/logging Docs
      Key<K, T>: T extends DefaultEventMap
          ? string | symbol
          : K | keyof T

      Type Parameters

      • K
      • T

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.Key2.html b/types/index._internal_.Key2.html new file mode 100644 index 0000000..0cf00a7 --- /dev/null +++ b/types/index._internal_.Key2.html @@ -0,0 +1 @@ +Key2 | @foxxmd/logging Docs
      Key2<K, T>: T extends DefaultEventMap
          ? string | symbol
          : K & keyof T

      Type Parameters

      • K
      • T

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.Level-1.html b/types/index._internal_.Level-1.html new file mode 100644 index 0000000..40b9180 --- /dev/null +++ b/types/index._internal_.Level-1.html @@ -0,0 +1 @@ +Level | @foxxmd/logging Docs
      Level: Level

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.Level.html b/types/index._internal_.Level.html new file mode 100644 index 0000000..1d30928 --- /dev/null +++ b/types/index._internal_.Level.html @@ -0,0 +1 @@ +Level | @foxxmd/logging Docs
      Level: "fatal" | "error" | "warn" | "info" | "debug" | "trace"

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.LevelChangeEventListener.html b/types/index._internal_.LevelChangeEventListener.html new file mode 100644 index 0000000..4602871 --- /dev/null +++ b/types/index._internal_.LevelChangeEventListener.html @@ -0,0 +1 @@ +LevelChangeEventListener | @foxxmd/logging Docs

      Type alias LevelChangeEventListener<CustomLevels>

      LevelChangeEventListener<CustomLevels>: ((lvl, val, prevLvl, prevVal, logger) => void)

      Type Parameters

      • CustomLevels extends string = never

      Type declaration

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.LevelOrString.html b/types/index._internal_.LevelOrString.html new file mode 100644 index 0000000..733943c --- /dev/null +++ b/types/index._internal_.LevelOrString.html @@ -0,0 +1 @@ +LevelOrString | @foxxmd/logging Docs
      LevelOrString: Level | string & {}

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.LevelWithSilent.html b/types/index._internal_.LevelWithSilent.html new file mode 100644 index 0000000..0d70219 --- /dev/null +++ b/types/index._internal_.LevelWithSilent.html @@ -0,0 +1 @@ +LevelWithSilent | @foxxmd/logging Docs
      LevelWithSilent: Level | "silent"

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.LevelWithSilentOrString.html b/types/index._internal_.LevelWithSilentOrString.html new file mode 100644 index 0000000..8de8287 --- /dev/null +++ b/types/index._internal_.LevelWithSilentOrString.html @@ -0,0 +1 @@ +LevelWithSilentOrString | @foxxmd/logging Docs
      LevelWithSilentOrString: LevelWithSilent | string & {}

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.Listener.html b/types/index._internal_.Listener.html new file mode 100644 index 0000000..79c581a --- /dev/null +++ b/types/index._internal_.Listener.html @@ -0,0 +1 @@ +Listener | @foxxmd/logging Docs
      Listener<K, T, F>: T extends DefaultEventMap
          ? F
          : K extends keyof T
              ? T[K] extends unknown[]
                  ? ((...args) => void)
                  : never
              : never

      Type Parameters

      • K
      • T
      • F

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.Logger-1.html b/types/index._internal_.Logger-1.html new file mode 100644 index 0000000..1dc235d --- /dev/null +++ b/types/index._internal_.Logger-1.html @@ -0,0 +1 @@ +Logger | @foxxmd/logging Docs

      Type alias Logger<CustomLevels>

      Type Parameters

      • CustomLevels extends string = never

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.Logger.html b/types/index._internal_.Logger.html new file mode 100644 index 0000000..85042fa --- /dev/null +++ b/types/index._internal_.Logger.html @@ -0,0 +1 @@ +Logger | @foxxmd/logging Docs

      Type alias Logger<CustomLevels>

      Type Parameters

      • CustomLevels extends string = never

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.OnChildCallback.html b/types/index._internal_.OnChildCallback.html new file mode 100644 index 0000000..d404d68 --- /dev/null +++ b/types/index._internal_.OnChildCallback.html @@ -0,0 +1,2 @@ +OnChildCallback | @foxxmd/logging Docs

      Type alias OnChildCallback<CustomLevels>

      OnChildCallback<CustomLevels>: ((child) => void)

      A synchronous callback that will run on each creation of a new child.

      +

      Type Parameters

      • CustomLevels extends string = never

      Type declaration

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.Record.html b/types/index._internal_.Record.html new file mode 100644 index 0000000..0ff4ed8 --- /dev/null +++ b/types/index._internal_.Record.html @@ -0,0 +1,2 @@ +Record | @foxxmd/logging Docs
      Record<K, T>: {
          [P in K]: T
      }

      Construct a type with a set of properties K of type T

      +

      Type Parameters

      • K extends keyof any
      • T

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.Required.html b/types/index._internal_.Required.html new file mode 100644 index 0000000..2bedf99 --- /dev/null +++ b/types/index._internal_.Required.html @@ -0,0 +1,2 @@ +Required | @foxxmd/logging Docs
      Required<T>: {
          [P in keyof T]-?: T[P]
      }

      Make all properties in T required

      +

      Type Parameters

      • T

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index._internal_.SerializerFn.html b/types/index._internal_.SerializerFn.html new file mode 100644 index 0000000..af1fb3b --- /dev/null +++ b/types/index._internal_.SerializerFn.html @@ -0,0 +1 @@ +SerializerFn | @foxxmd/logging Docs
      SerializerFn: ((value) => any)

      Type declaration

        • (value): any
        • Parameters

          • value: any

          Returns any

      Generated using TypeDoc

      \ No newline at end of file diff --git a/variables/factory.prettyConsole.html b/variables/factory.prettyConsole.html index 70a8da6..6823cc9 100644 --- a/variables/factory.prettyConsole.html +++ b/variables/factory.prettyConsole.html @@ -1 +1 @@ -prettyConsole | @foxxmd/logging Docs

      Variable prettyConsoleConst

      prettyConsole: PrettyOptions = ...

      Generated using TypeDoc

      \ No newline at end of file +prettyConsole | @foxxmd/logging Docs

      Variable prettyConsoleConst

      prettyConsole: PrettyOptions_ = ...

      Generated using TypeDoc

      \ No newline at end of file diff --git a/variables/factory.prettyFile.html b/variables/factory.prettyFile.html index fe2551d..c03172a 100644 --- a/variables/factory.prettyFile.html +++ b/variables/factory.prettyFile.html @@ -1 +1 @@ -prettyFile | @foxxmd/logging Docs

      Variable prettyFileConst

      prettyFile: PrettyOptions = ...

      Generated using TypeDoc

      \ No newline at end of file +prettyFile | @foxxmd/logging Docs

      Variable prettyFileConst

      prettyFile: PrettyOptions_ = ...

      Generated using TypeDoc

      \ No newline at end of file diff --git a/variables/index.LOG_LEVELS.html b/variables/index.LOG_LEVELS.html index 35eb300..54be655 100644 --- a/variables/index.LOG_LEVELS.html +++ b/variables/index.LOG_LEVELS.html @@ -1 +1 @@ -LOG_LEVELS | @foxxmd/logging Docs

      Variable LOG_LEVELSConst

      LOG_LEVELS: readonly ["silent", "fatal", "error", "warn", "info", "log", "verbose", "debug"] = ...

      Generated using TypeDoc

      \ No newline at end of file +LOG_LEVELS | @foxxmd/logging Docs

      Variable LOG_LEVELSConst

      LOG_LEVELS: readonly ["silent", "fatal", "error", "warn", "info", "log", "verbose", "debug"] = ...

      Generated using TypeDoc

      \ No newline at end of file diff --git a/variables/index.loggerDebug.html b/variables/index.loggerDebug.html index bdafcb4..1659b12 100644 --- a/variables/index.loggerDebug.html +++ b/variables/index.loggerDebug.html @@ -1 +1 @@ -loggerDebug | @foxxmd/logging Docs

      Variable loggerDebugConst

      loggerDebug: Logger = ...

      Generated using TypeDoc

      \ No newline at end of file +loggerDebug | @foxxmd/logging Docs

      Variable loggerDebugConst

      loggerDebug: Logger = ...

      Generated using TypeDoc

      \ No newline at end of file diff --git a/variables/index.loggerTest.html b/variables/index.loggerTest.html index fece51a..54ead87 100644 --- a/variables/index.loggerTest.html +++ b/variables/index.loggerTest.html @@ -1 +1 @@ -loggerTest | @foxxmd/logging Docs

      Variable loggerTestConst

      loggerTest: Logger = ...

      Generated using TypeDoc

      \ No newline at end of file +loggerTest | @foxxmd/logging Docs

      Variable loggerTestConst

      loggerTest: Logger = ...

      Generated using TypeDoc

      \ No newline at end of file