congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Logger.warn
Code IndexAdd Tabnine to your IDE (free)

How to use
warn
method
in
com.speedment.common.logger.Logger

Best Java code snippets using com.speedment.common.logger.Logger.warn (Showing top 20 results out of 315)

origin: speedment/speedment

  void setMaxRetainSize(int maxRetainSize) {
    LOGGER_CONNECTION.warn("Unsafe method called. Use configuration parameters to set this value instead");
    this.maxRetainSize = maxRetainSize;
  }
}
origin: speedment/speedment

void setMaxAge(long maxAge) {
  LOGGER_CONNECTION.warn("Unsafe method called. Use configuration parameters to set this value instead");
  this.maxAge = maxAge;
}
origin: speedment/speedment

public static void trip(Class<?> trippingClass, String msg) {
  LOGGER.warn(trippingClass.getName() + ", " + msg);
}

origin: speedment/speedment

private <T> T readSilent(ResultSet rs, SqlSupplier<T> supplier, boolean fullWarning) {
  try {
    final T result = supplier.get();
    if (rs.wasNull()) {
      return null;
    } else {
      return result;
    }
  } catch (SQLException sqle) {
    // ignore, just return null
    if (fullWarning) {
      LOGGER.warn(sqle, "Unable to read column metadata: " + sqle.getMessage());
    } else {
      LOGGER.info("Metadata not supported: " + sqle.getMessage());
    }
  }
  return null;
}
origin: speedment/speedment

@ExecuteBefore(STARTED)
void checkSpeedmentVersion(Injector injector) {
  injector.get(InfoComponent.class).ifPresent(ic -> {
    final String expected = ic.getEditionAndVersionString();
    final String actual = project.getSpeedmentVersion().orElse(null);
    if (!expected.equals(actual)) {
      LOGGER.warn(format(
        "Code generated using '%s' and running with '%s'. Make sure "
        + "versions and editions match to avoid performance and "
        + "stability issues.", actual, expected));
    }
  }
  );
}
origin: speedment/speedment

  LOGGER.warn("Enum spaces will be converted to underscores in Java");
  return value;
} else {
origin: speedment/speedment

  private void blockUntilAvailable() {
    if (closed) {
      throw new IllegalStateException("This connection has already been closed.");
    }
    if (!available) {
      LOGGER_CONNECTION.debug("Aquiring connection");
      try {
        if (!lock.tryAcquire()) {
          if (blocking) {
            LOGGER_CONNECTION.warn("Waiting for connection to become available...");
            lock.acquire();
          } else {
            throw new SpeedmentException(
              "Error! No connection available. Try " +
              "wrapping the expression in a transaction or " +
              "enable the Speedment parameter " +
              "'connectionpool.blocking=true'.");
          }
        }
      } catch (final InterruptedException ex) {
        throw new SpeedmentException(
          "Interrupted while waiting for available connection.", ex);
      }
      this.counter.incrementAndGet();
      available = true;
    }
  }
}
origin: speedment/speedment

@ExecuteBefore(State.STOPPED)
void closeOpenConnections() {
  leasedConnections.values().forEach(conn -> {
    try {
      if (!conn.isClosed()) {
        conn.close();
        LOGGER_CONNECTION.warn("Leased connection had to be closed automatically.");
      }
    } catch (final SQLException ex) {
      throw new SpeedmentException(ex);
    }
  });
  pools.values().forEach(queue -> {
    PoolableConnection conn;
    while ((conn = queue.poll()) != null) {
      try {
        if (!conn.isClosed()) {
          conn.rawClose();
        }
      } catch (final SQLException ex) {
        throw new SpeedmentException("Error closing connection.", ex);
      }
    }
  });
}
origin: speedment/speedment

private void primaryKeyColumns(Connection conn, Table table, ProgressMeasure progress) {
  requireNonNulls(conn, table, progress);
  final SqlSupplier<ResultSet> supplier = () ->
    conn.getMetaData().getPrimaryKeys(null, null, table.getId());
  final TableChildMutator<PrimaryKeyColumn> mutator = (pkc, rs) -> {
    final String columnName = rs.getString("COLUMN_NAME");
    pkc.mutator().setId(columnName);
    pkc.mutator().setName(columnName);
    pkc.mutator().setOrdinalPosition(rs.getInt("KEY_SEQ"));
  };
  tableChilds(
    table,
    PrimaryKeyColumn.class,
    table.mutator()::addNewPrimaryKeyColumn,
    supplier,
    rsChild -> rsChild.getString("COLUMN_NAME"),
    mutator
  );
  if (!table.isView() && table.primaryKeyColumns().noneMatch(pk -> true)) {
    LOGGER.warn(format("Table '%s' does not have any primary key.",
      table.getId()));
  }
}
origin: speedment/speedment

protected void primaryKeyColumns(Connection connection, Table table, ProgressMeasure progressListener) {
  requireNonNulls(connection, table);
  final Schema schema = table.getParentOrThrow();
  final SqlSupplier<ResultSet> supplier = ()
    -> connection.getMetaData().getPrimaryKeys(jdbcCatalogLookupName(schema),
      jdbcSchemaLookupName(schema),
      metaDataTableNameForPrimaryKeys(table)
    );
  final AbstractDbmsOperationHandler.TableChildMutator<PrimaryKeyColumn, ResultSet> mutator = (primaryKeyColumn, rs) -> {
    final String columnName = rs.getString("COLUMN_NAME");
    primaryKeyColumn.mutator().setId(columnName);
    primaryKeyColumn.mutator().setName(columnName);
    primaryKeyColumn.mutator().setOrdinalPosition(rs.getInt("KEY_SEQ"));
  };
  tableChilds(PrimaryKeyColumn.class, table.mutator()::addNewPrimaryKeyColumn, supplier, mutator, progressListener);
  
  if (!table.isView() && table.primaryKeyColumns().noneMatch(pk -> true)) {
    LOGGER.warn("Table '" + table.getId() + "' does not have any primary key.");
  }
}
origin: speedment/speedment

LOGGER.info(msg);
if (!info.isProductionMode()) {
  LOGGER.warn("This version is NOT INTENDED FOR PRODUCTION USE!");
  LOGGER.info("Upstream version is " + upstreamInfo.getImplementationVersion() + " (" + upstreamInfo.getSpecificationNickname() + ")");
  if (!upstreamInfo.isProductionMode()) {
    LOGGER.warn("Upstream version is NOT INTENDED FOR PRODUCTION USE!");
  if (isVersionOk.isPresent()) {
    if (!isVersionOk.get()) {
      LOGGER.warn("The current Java version (" + versionString + 
        ") is outdated. Please upgrade to a more recent " + 
        "Java version.");
    LOGGER.warn("Unable to fully parse the java version. " + 
      "Version check skipped!");
origin: speedment/speedment

LOGGER.warn("Creating new Speedment instance for UI session.");
INJECTOR = new DefaultApplicationBuilder(
    getClass().getClassLoader(),
origin: speedment/speedment

LOGGER.warn(
  String.format("Unable to determine mapping for table %s, column %s. "
    + "Type name %s, data type %d, decimal digits %d."
origin: com.speedment.runtime/runtime-core

  void setMaxRetainSize(int maxRetainSize) {
    LOGGER_CONNECTION.warn("Unsafe method called. Use configuration parameters to set this value instead");
    this.maxRetainSize = maxRetainSize;
  }
}
origin: com.speedment.runtime/runtime-core

void setMaxAge(long maxAge) {
  LOGGER_CONNECTION.warn("Unsafe method called. Use configuration parameters to set this value instead");
  this.maxAge = maxAge;
}
origin: com.speedment.runtime/runtime-core

private <T> T readSilent(ResultSet rs, SqlSupplier<T> supplier, boolean fullWarning) {
  try {
    final T result = supplier.get();
    if (rs.wasNull()) {
      return null;
    } else {
      return result;
    }
  } catch (SQLException sqle) {
    // ignore, just return null
    if (fullWarning) {
      LOGGER.warn(sqle, "Unable to read column metadata: " + sqle.getMessage());
    } else {
      LOGGER.info("Metadata not supported: " + sqle.getMessage());
    }
  }
  return null;
}
origin: com.speedment.runtime/runtime-core

@ExecuteBefore(STARTED)
void checkSpeedmentVersion(Injector injector) {
  injector.get(InfoComponent.class).ifPresent(ic -> {
    final String expected = ic.getEditionAndVersionString();
    final String actual = project.getSpeedmentVersion().orElse(null);
    if (!expected.equals(actual)) {
      LOGGER.warn(format(
        "Code generated using '%s' and running with '%s'. Make sure "
        + "versions and editions match to avoid performance and "
        + "stability issues.", actual, expected));
    }
  }
  );
}
origin: com.speedment.runtime/runtime-core

@ExecuteBefore(State.STOPPED)
void closeOpenConnections() {
  leasedConnections.values().forEach(conn -> {
    try {
      if (!conn.isClosed()) {
        conn.close();
        LOGGER_CONNECTION.warn("Leased connection had to be closed automatically.");
      }
    } catch (final SQLException ex) {
      throw new SpeedmentException(ex);
    }
  });
  pools.values().forEach(queue -> {
    PoolableConnection conn;
    while ((conn = queue.poll()) != null) {
      try {
        if (!conn.isClosed()) {
          conn.rawClose();
        }
      } catch (final SQLException ex) {
        throw new SpeedmentException("Error closing connection.", ex);
      }
    }
  });
}
origin: com.speedment.runtime/connector-sqlite

private void primaryKeyColumns(Connection conn, Table table, ProgressMeasure progress) {
  requireNonNulls(conn, table, progress);
  final SqlSupplier<ResultSet> supplier = () ->
    conn.getMetaData().getPrimaryKeys(null, null, table.getId());
  final TableChildMutator<PrimaryKeyColumn> mutator = (pkc, rs) -> {
    final String columnName = rs.getString("COLUMN_NAME");
    pkc.mutator().setId(columnName);
    pkc.mutator().setName(columnName);
    pkc.mutator().setOrdinalPosition(rs.getInt("KEY_SEQ"));
  };
  tableChilds(
    table,
    PrimaryKeyColumn.class,
    table.mutator()::addNewPrimaryKeyColumn,
    supplier,
    rsChild -> rsChild.getString("COLUMN_NAME"),
    mutator
  );
  if (!table.isView() && table.primaryKeyColumns().noneMatch(pk -> true)) {
    LOGGER.warn(format("Table '%s' does not have any primary key.",
      table.getId()));
  }
}
origin: com.speedment.runtime/runtime-core

protected void primaryKeyColumns(Connection connection, Table table, ProgressMeasure progressListener) {
  requireNonNulls(connection, table);
  final Schema schema = table.getParentOrThrow();
  final SqlSupplier<ResultSet> supplier = ()
    -> connection.getMetaData().getPrimaryKeys(jdbcCatalogLookupName(schema),
      jdbcSchemaLookupName(schema),
      metaDataTableNameForPrimaryKeys(table)
    );
  final AbstractDbmsOperationHandler.TableChildMutator<PrimaryKeyColumn, ResultSet> mutator = (primaryKeyColumn, rs) -> {
    final String columnName = rs.getString("COLUMN_NAME");
    primaryKeyColumn.mutator().setId(columnName);
    primaryKeyColumn.mutator().setName(columnName);
    primaryKeyColumn.mutator().setOrdinalPosition(rs.getInt("KEY_SEQ"));
  };
  tableChilds(PrimaryKeyColumn.class, table.mutator()::addNewPrimaryKeyColumn, supplier, mutator, progressListener);
  
  if (!table.isView() && table.primaryKeyColumns().noneMatch(pk -> true)) {
    LOGGER.warn("Table '" + table.getId() + "' does not have any primary key.");
  }
}
com.speedment.common.loggerLoggerwarn

Javadoc

Logs a message at level com.speedment.common.logger.Level#WARN.

Popular methods of Logger

  • error
    Logs a message based on the given format and enriched with the passed arguments at level com.speedme
  • info
    Logs a message based on the given format and enriched with the passed arguments at level com.speedme
  • debug
    Logs a message based on the given format and enriched with the passed arguments at level com.speedme
  • getLevel
    Returns the current log level.
  • setLevel
    Sets the current log level.
  • addListener
    Adds a LoggerEventListener to this Logger.
  • removeListener
    Removes a LoggerEventListener to this Logger if it was previously registered.
  • setFormatter
    Sets the formatter.
  • trace
    Logs a message based on the given format and enriched with the passed arguments at level com.speedme

Popular in Java

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • getSystemService (Context)
  • getApplicationContext (Context)
  • Kernel (java.awt.image)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now