Statistics
| Branch: | Tag: | Revision:

root / Logging.pas @ 119:66352054ce4d

History | View | Annotate | Download (552 Bytes)

1
unit Logging;
2
3
{$mode objfpc}{$H+}
4
5
interface
6
7
uses
8
  MultiLog{$IFNDEF NoLogging}, IPCChannel{$ENDIF};
9
10
const
11
  lcAll = [0..31]; //all logging classes
12
  lcDebug = 0;
13
  lcError = 1;
14
  lcInfo = 2;
15
  lcWarning = 3;
16
17
  lcEvents = 4;
18
19
  lcServer = 10;
20
  lcClient = 11;
21
  lcLandscape = 12;
22
23
var
24
  Logger: TLogger;
25
26
implementation
27
28
initialization
29
  Logger := TLogger.Create;
30
  {$IFNDEF NoLogging}
31
  Logger.Channels.Add(TIPCChannel.Create);
32
  Logger.ActiveClasses := lcAll;
33
  {$ENDIF}
34
35
finalization
36
  Logger.Free;
37
38
end.
39