示例#1
0
 /// <summary>
 /// Construct a LogRecord with the given level and message values.
 /// <para>
 /// The sequence property will be initialized with a new unique value.
 /// These sequence values are allocated in increasing order within a VM.
 /// </para>
 /// <para>
 /// The millis property will be initialized to the current time.
 /// </para>
 /// <para>
 /// The thread ID property will be initialized with a unique ID for
 /// the current thread.
 /// </para>
 /// <para>
 /// All other properties will be initialized to "null".
 ///
 /// </para>
 /// </summary>
 /// <param name="level">  a logging level value </param>
 /// <param name="msg">  the raw non-localized logging message (may be null) </param>
 public LogRecord(Level level, String msg)
 {
     // Make sure level isn't null, by calling random method.
     level.GetType();
     this.Level_Renamed = level;
     Message_Renamed    = msg;
     // Assign a thread ID and a unique sequence number.
     SequenceNumber_Renamed = GlobalSequenceNumber.AndIncrement;
     ThreadID_Renamed       = DefaultThreadID();
     Millis_Renamed         = DateTimeHelperClass.CurrentUnixTimeMillis();
     NeedToInferCaller      = true;
 }
示例#2
0
 internal readonly Level MirroredLevel;           // mirror of the custom Level
 internal KnownLevel(Level l)
 {
     this.LevelObject = l;
     if (l.GetType() == typeof(Level))
     {
         this.MirroredLevel = l;
     }
     else
     {
         // this mirrored level object is hidden
         this.MirroredLevel = new Level(l.Name_Renamed, l.Value, l.ResourceBundleName_Renamed, false);
     }
 }