Remove JNI logging (#1872)

This commit is contained in:
Thad House
2019-09-06 18:42:40 -07:00
committed by Peter Johnson
parent 3e0f7d0995
commit dd928b4cbf
24 changed files with 21 additions and 1261 deletions

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2016-2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -12,19 +12,9 @@
#include "HALUtil.h"
#include "edu_wpi_first_hal_ThreadsJNI.h"
#include "hal/Threads.h"
#include "hal/cpp/Log.h"
using namespace frc;
// set the logging level
TLogLevel threadsJNILogLevel = logWARNING;
#define THREADSJNI_LOG(level) \
if (level > threadsJNILogLevel) \
; \
else \
Log().Get(level)
extern "C" {
/*
* Class: edu_wpi_first_hal_ThreadsJNI
@@ -35,7 +25,6 @@ JNIEXPORT jint JNICALL
Java_edu_wpi_first_hal_ThreadsJNI_getCurrentThreadPriority
(JNIEnv* env, jclass)
{
THREADSJNI_LOG(logDEBUG) << "Callling GetCurrentThreadPriority";
int32_t status = 0;
HAL_Bool isRT = false;
auto ret = HAL_GetCurrentThreadPriority(&isRT, &status);
@@ -52,7 +41,6 @@ JNIEXPORT jboolean JNICALL
Java_edu_wpi_first_hal_ThreadsJNI_getCurrentThreadIsRealTime
(JNIEnv* env, jclass)
{
THREADSJNI_LOG(logDEBUG) << "Callling GetCurrentThreadIsRealTime";
int32_t status = 0;
HAL_Bool isRT = false;
HAL_GetCurrentThreadPriority(&isRT, &status);
@@ -69,7 +57,6 @@ JNIEXPORT jboolean JNICALL
Java_edu_wpi_first_hal_ThreadsJNI_setCurrentThreadPriority
(JNIEnv* env, jclass, jboolean realTime, jint priority)
{
THREADSJNI_LOG(logDEBUG) << "Callling SetCurrentThreadPriority";
int32_t status = 0;
auto ret = HAL_SetCurrentThreadPriority(
(HAL_Bool)realTime, static_cast<int32_t>(priority), &status);