<commit_before>// $Id$

#include <base/logstream.h>
#include <base/job_identifier.h>

#include <sys/resource.h>
#include <iomanip>

LogStream deallog;



LogStream::LogStream()
		: std_out(&cerr), file(0), was_endl(true),
		  std_depth(10000), file_depth(10000),
		  print_utime(false)
{
  prefixes.push("DEAL:");
  std_out->setf(ios::showpoint | ios::left);
}




void
LogStream::attach(ostream& o)
{
  file = &o;
  o.setf(ios::showpoint | ios::left);
  o << dealjobid();
}



void LogStream::detach ()
{
  file = 0;
};



ostream&
LogStream::get_console()
{
  return *std_out;
}



ostream&
LogStream::get_file_stream()
{
  Assert(file, ExcNoFileStreamGiven());
  return *file;
}



void
LogStream::push (const string& text)
{
				   // strange enough: if make this
				   // function non-inline with
				   // gcc2.8, we get very strange
				   // compiler errors...
  string pre=prefixes.top();
  pre += text;
  pre += string(":");
  prefixes.push(pre);
}


void LogStream::pop ()
{
  prefixes.pop();
}



void
LogStream::depth_console(unsigned n)
{
  std_depth = n;
};



void
LogStream::depth_file(unsigned n)
{
  file_depth = n;
};



void
LogStream::log_execution_time(bool flag)
{
  print_utime = flag;
}
<commit_msg>Remove outdated comment.<commit_after>// $Id$

#include <base/logstream.h>
#include <base/job_identifier.h>

#include <sys/resource.h>
#include <iomanip>

LogStream deallog;



LogStream::LogStream()
		: std_out(&cerr), file(0), was_endl(true),
		  std_depth(10000), file_depth(10000),
		  print_utime(false)
{
  prefixes.push("DEAL:");
  std_out->setf(ios::showpoint | ios::left);
}




void
LogStream::attach(ostream& o)
{
  file = &o;
  o.setf(ios::showpoint | ios::left);
  o << dealjobid();
}



void LogStream::detach ()
{
  file = 0;
};



ostream&
LogStream::get_console()
{
  return *std_out;
}



ostream&
LogStream::get_file_stream()
{
  Assert(file, ExcNoFileStreamGiven());
  return *file;
}



void
LogStream::push (const string& text)
{
  string pre=prefixes.top();
  pre += text;
  pre += string(":");
  prefixes.push(pre);
};



void LogStream::pop ()
{
  prefixes.pop();
};



void
LogStream::depth_console(unsigned n)
{
  std_depth = n;
};



void
LogStream::depth_file(unsigned n)
{
  file_depth = n;
};



void
LogStream::log_execution_time(bool flag)
{
  print_utime = flag;
}

{'fraction_non_alphanumeric': 0.16946236559139785, 'fraction_numerical': 0.011182795698924731, 'mean_word_length': 4.023758099352052, 'pattern_counts': {'":': 2, '<': 15, '<?xml version=': 0, '>': 13, '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': '5869578', 'n_tokens_mistral': 987, 'n_tokens_neox': 895, 'n_words': 167}