How to use the @wireapp/commons.LogFactory.writeMessage function in @wireapp/commons

To help you get started, we’ve selected a few @wireapp/commons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wireapp / wire-desktop / electron / src / main.ts View on Github external
contents.on('console-message', async (event, level, message) => {
              const webViewId = getWebViewId(contents);
              if (webViewId) {
                const logFilePath = path.join(LOG_DIR, webViewId, config.logFileName);
                try {
                  await LogFactory.writeMessage(message, logFilePath);
                } catch (error) {
                  logger.log(`Cannot write to log file "${logFilePath}": ${error.message}`, error);
                }
              }
            });
          }