File: newlog.cc

package info (click to toggle)
stealth 4.04.00-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,540 kB
  • sloc: cpp: 2,759; sh: 151; makefile: 111; ansic: 52
file content (14 lines) | stat: -rw-r--r-- 313 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "logunit.ih"

ostream *LogUnit::newLog()
try
{
    string const &name = d_options.logName();

    return name.empty() ? 0 : new Log(name); 
}
catch (exception const &exc)
{
    fmsg << "cannot write log file `" << d_options.logName() << '\'' << noidl;
    return 0;       // to make the compiler happy
}