"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7561/react/features/base/logging/ExternalApiLogTransport.ts" (29 Sep 2023, 463 Bytes) of package /linux/misc/jitsi-meet-7561.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /**
    2  * Constructs a log transport object for use with external API.
    3  *
    4  * @param {Array} levels - The log levels forwarded to the external API.
    5 
    6  * @returns {Object} - The transport object.
    7  */
    8 function buildTransport(levels: Array<string>) {
    9     return levels.reduce((logger: any, level) => {
   10         logger[level] = (...args: any) => {
   11             APP.API.notifyLog(level, args);
   12         };
   13 
   14         return logger;
   15     }, {});
   16 }
   17 
   18 export default buildTransport;