#include "LogSettings.h"

#include <stdlib.h>

static LogSettings* g_pLogSettingsInstance = NULL;

LogSettings* LogSettings_Construct(LogSettings* pThis)
{
  pThis->nRank            = -1;
  pThis->bLogToCommonFile = TRUE;
  pThis->bLogToFile       = TRUE;
  pThis->bLogToStdout     = TRUE;

  return pThis;
}

void LogSettings_Destruct(LogSettings* pThis)
{
  if(pThis)
  {
    free(pThis);
  }
}

LogSettings* LogSettings_Instance(void)
{
  if(g_pLogSettingsInstance)
  {
  }
  else
  {
    g_pLogSettingsInstance = LogSettings_Construct((LogSettings*)malloc(sizeof(LogSettings)));
  }

  return g_pLogSettingsInstance;
}

