/**
 * A function that builds the logger
 *
 * @function CreateLog
 * @param {*[]} messages An array of messages to log
 */

/**
 * Creates a logger
 *
 * @param {boolean} isActive Toggle logging
 * @returns {LogBuilder} A function that builds the logger
 */
export const createLog = (isActive: boolean) => {
  return (...messages: any[]) => {
    if (isActive) {
      console.log(...messages)
    }
  }
}

export const log = createLog(true)
