How to use the lisk-framework/src/components/logger.createLoggerComponent function in lisk-framework

To help you get started, we’ve selected a few lisk-framework 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 jondubois / lisk-dex / index.js View on Github external
this.logger.error(
                  `Failed to process ${chainOptions.moduleAlias}:postTransaction action - ${postTxnResult.message}`
                );
              }
            }
          }
        }
        return;
      }
    });

    let loggerConfig = await channel.invoke(
      'app:getComponentConfig',
      'logger',
    );
    this.logger = createLoggerComponent({...loggerConfig, ...this.options.logger});

    try {
      await mkdir(this.options.orderBookSnapshotBackupDirPath);
    } catch (error) {
      if (error.code !== 'EEXIST') {
        this.logger.error(
          `Failed to create snapshot directory ${
            this.options.orderBookSnapshotBackupDirPath
          } because of error: ${
            error.message
          }`
        );
      }
    }

    try {