001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package org.wpilib.networktables;
006
007/** NetworkTables log message. */
008public final class LogMessage {
009  /** Critical logging level. */
010  public static final int CRITICAL = 50;
011
012  /** Error logging level. */
013  public static final int ERROR = 40;
014
015  /** Warning log level. */
016  public static final int WARNING = 30;
017
018  /** Info log level. */
019  public static final int INFO = 20;
020
021  /** Debug log level. */
022  public static final int DEBUG = 10;
023
024  /** Debug log level 1. */
025  public static final int DEBUG_1 = 9;
026
027  /** Debug log level 2. */
028  public static final int DEBUG_2 = 8;
029
030  /** Debug log level 3. */
031  public static final int DEBUG_3 = 7;
032
033  /** Debug log level 4. */
034  public static final int DEBUG_4 = 6;
035
036  /** Log level of the message. */
037  public final int level;
038
039  /** The filename of the source file that generated the message. */
040  public final String filename;
041
042  /** The line number in the source file that generated the message. */
043  public final int line;
044
045  /** The message. */
046  public final String message;
047
048  /**
049   * Constructor. This should generally only be used internally to NetworkTables.
050   *
051   * @param level Log level
052   * @param filename Filename
053   * @param line Line number
054   * @param message Message
055   */
056  public LogMessage(int level, String filename, int line, String message) {
057    this.level = level;
058    this.filename = filename;
059    this.line = line;
060    this.message = message;
061  }
062}