<commit_before>import { blogAPI } from 'utils/axios';
import { logger } from 'utils/logs';

/**
 * Fetchs posts from wordpress API.
 *
 * @param {Object} params - params sent to the API.
 * @param {Object} headers - headers sent to the API.
 * @returns {Object[]} array of parsed posts.
 */
export const fetchPosts = (params = {}, headers = {}) => {
  logger.info('fetches posts from blog', `process.env.BLOG_API_URL: '${process.env.BLOG_API_URL}'`, ` params: '${params}'`, ` headers: '${headers}'`);

  return blogAPI.get('/posts', {
    headers: { ...headers },
    params: { ...params }
  })
    .then((response) => {
      const { status, statusText, data } = response;
<commit_msg>fix new logs for fetching blog posts<commit_after>import { blogAPI } from 'utils/axios';
import { logger } from 'utils/logs';

/**
 * Fetchs posts from wordpress API.
 *
 * @param {Object} params - params sent to the API.
 * @param {Object} headers - headers sent to the API.
 * @returns {Object[]} array of parsed posts.
 */
export const fetchPosts = (params = {}, headers = {}) => {
  logger.info(`fetches posts from blog, process.env.BLOG_API_URL: '${process.env.BLOG_API_URL}' params: '${params}' headers: '${headers}'`);

  return blogAPI.get('/posts', {
    headers: { ...headers },
    params: { ...params }
  })
    .then((response) => {
      const { status, statusText, data } = response;

{'fraction_non_alphanumeric': 0.1776173285198556, 'fraction_numerical': 0.0, 'mean_word_length': 3.514657980456026, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4286176', 'n_tokens_mistral': 439, 'n_tokens_neox': 436, 'n_words': 130}