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 edu.wpi.first.networktables;
006
007/** NetworkTables log message. */
008@SuppressWarnings("MemberName")
009public final class LogMessage {
010  /** Logging levels. */
011  public static final int kCritical = 50;
012
013  public static final int kError = 40;
014  public static final int kWarning = 30;
015  public static final int kInfo = 20;
016  public static final int kDebug = 10;
017  public static final int kDebug1 = 9;
018  public static final int kDebug2 = 8;
019  public static final int kDebug3 = 7;
020  public static final int kDebug4 = 6;
021
022  /** Log level of the message. */
023  public final int level;
024
025  /** The filename of the source file that generated the message. */
026  public final String filename;
027
028  /** The line number in the source file that generated the message. */
029  public final int line;
030
031  /** The message. */
032  public final String message;
033
034  /**
035   * Constructor. This should generally only be used internally to NetworkTables.
036   *
037   * @param level Log level
038   * @param filename Filename
039   * @param line Line number
040   * @param message Message
041   */
042  public LogMessage(int level, String filename, int line, String message) {
043    this.level = level;
044    this.filename = filename;
045    this.line = line;
046    this.message = message;
047  }
048}