How to use the signale.debug function in signale

To help you get started, we’ve selected a few signale 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 blurHY / HorizonSpider / DataBase.js View on Github external
async connect(truncate) {
        this.client = new elasticsearch.Client({
            node: 'http://localhost:9200',
            compression: true
        });
        try {
            await this.client.ping()
            if (await this.client.indices.exists({
                index: ["site", "feed", "op_file"]
            }) && (!truncate))
                signale.debug("Indices exist")
            else {
                await this.client.indices.delete({
                    index: "*" // Clear broken indices
                })
                signale.debug("Deleted all indices")
                await this.client.indices.create({ // Difference between original names and these: '_' instead of '-'
                    index: "site",
                    body: {
                        "mappings": {
                            "properties": {
                                "address": { "type": "keyword" },
                                "title": {
                                    "type": "text",
                                    "analyzer": "ik_max_word",
                                    "search_analyzer": "ik_smart"
                                },
github umijs / umi / packages / umi-build-dev / src / UserConfig.js View on Github external
this.watchConfigs((event, path) => {
      signale.debug(`[${event}] ${path}`);
      try {
        const newConfig = this.getConfig({
          force: true,
          setConfig: newConfig => {
            this.config = newConfig;
          },
        });

        // 从失败中恢复过来,需要 reload 一次
        if (this.configFailed) {
          this.configFailed = false;
          this.service.refreshBrowser();
        }

        const oldConfig = cloneDeep(this.config);
        this.config = newConfig;
github blurHY / HorizonSpider / DataBase.js View on Github external
async connect(truncate) {
        this.client = new elasticsearch.Client({
            node: 'http://localhost:9200',
            compression: true
        });
        try {
            await this.client.ping()
            if (await this.client.indices.exists({
                index: ["site", "feed", "op_file"]
            }) && (!truncate))
                signale.debug("Indices exist")
            else {
                await this.client.indices.delete({
                    index: "*" // Clear broken indices
                })
                signale.debug("Deleted all indices")
                await this.client.indices.create({ // Difference between original names and these: '_' instead of '-'
                    index: "site",
                    body: {
                        "mappings": {
                            "properties": {
                                "address": { "type": "keyword" },
                                "title": {
                                    "type": "text",
                                    "analyzer": "ik_max_word",
                                    "search_analyzer": "ik_smart"
                                },
                                "files_number": { "type": "short" },
                                "op_files_number": { "type": "short" },
                                "domain": {
                                    "type": "text",
                                    "analyzer": "ik_max_word",
github lijinke666 / nodeJs-demos / 连接池 / client.js View on Github external
destroy(client) {
    debug('destroy')
    client.destroy();
  }
};
github marmelab / web-myna / src / config.js View on Github external
apis.map((api, index) => {
            const tokenName = api.name ? `${api.name.toUpperCase().replace(/-/g, '_')}_TOKEN` : null;
            signale.debug(tokenName);
            if (tokenName || isPlayerMode) {
                const apiToken = processEnv[tokenName];
                apis[index].token = isPlayerMode ? 'webMynaPlayerToken' : apiToken;
            }
        });
github slashbit / spider-less / src / libs / spider.js View on Github external
function getCharSet(headers) {
  let charSet = 'UTF-8'
  try {
    charSet = /charset=(.*)/.exec(headers['content-type'])[1]
  } catch (err) {
    signale.debug('Error parsing charset', headers)
  }
  return charSet
}
github blurHY / HorizonSpider / ZeroNet / ZeroWs.js View on Github external
connect() {
        let uri = `ws${this.secureWs ? "s" : ""}://${this.zeroNetHost}/Websocket?wrapper_key=${this.wrapper_key}`
        signale.debug(uri)

        this.ws.connect(uri, null, null, null, {})
    }
github lijinke666 / nodeJs-demos / 连接池 / client.js View on Github external
client.on("close", () => {
      debug("连接关闭");
      pool.release(client);
    });
    client.on("timeout", () => {