Subversion Repositories DevTools

Rev

Rev 4280 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4280 Rev 4285
Line 1... Line 1...
1
package com.erggroup.buildtool.abt;
1
package com.erggroup.buildtool.abt;
2
 
2
 
3
 
3
 
4
import java.util.Vector;
4
import java.util.Vector;
5
import org.apache.log4j.Logger;
-
 
-
 
5
 
6
import org.apache.tools.ant.Task;
6
import org.apache.tools.ant.Task;
7
 
7
 
8
 
8
 
9
public class ABTData extends Task
9
public class ABTData extends Task
10
{
10
{
Line 17... Line 17...
17
  // public
17
  // public
18
  // protected
18
  // protected
19
  // private
19
  // private
20
  // System
20
  // System
21
 
21
 
22
  private static final Logger mLogger = Logger.getLogger(ABTData.class);
-
 
23
  public static Vector<Machine> machineCollection = new Vector<Machine>();
22
  public static Vector<Machine> machineCollection = new Vector<Machine>();
24
  public static Vector<Owner> ownerCollection = new Vector<Owner>();
23
  public static Vector<Owner> ownerCollection = new Vector<Owner>();
25
 
24
 
26
  private void Log(String message1, String message2)
-
 
27
  {
-
 
28
    Log( message1 + message2, info );
-
 
29
  }
-
 
30
  
-
 
31
  private static final char debug = 0;
-
 
32
  private static final char info = 1;
-
 
33
  private static final char warn = 2;
-
 
34
  private static final char error = 3;
-
 
35
  private static final char fatal = 4;
-
 
36
  
25
  
37
  private void Log(String message, char facility)
-
 
38
  {
-
 
39
    if ( facility == debug)
-
 
40
    {
-
 
41
      mLogger.debug(message);
-
 
42
    }
-
 
43
    else
-
 
44
    if ( facility == info)
-
 
45
    {
-
 
46
      mLogger.info(message);
-
 
47
    }
-
 
48
    else
-
 
49
    if ( facility == warn)
-
 
50
    {
-
 
51
      mLogger.warn(message);
-
 
52
    }
-
 
53
    else
-
 
54
    if ( facility == error)
-
 
55
    {
-
 
56
      mLogger.error(message);
-
 
57
    }
-
 
58
    else
-
 
59
    {
-
 
60
      mLogger.fatal(message);
-
 
61
    }
-
 
62
    
-
 
63
    log( message );
-
 
64
  }
-
 
65
 
-
 
66
  /**
26
  /**
67
   * Init all data when the task is invoked
27
   * Init all data when the task is invoked
68
   * 
28
   * 
69
   */
29
   */
70
  public void init()
30
  public void init()