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

How to use
FormattedLogger
in
com.p6spy.engine.spy.appender

Best Java code snippets using com.p6spy.engine.spy.appender.FormattedLogger (Showing top 4 results out of 315)

origin: p6spy/p6spy

@Override
public void logSQL(int connectionId, String now, long elapsed, Category category, String prepared, String sql, String url) {
 logText(strategy.formatMessage(connectionId, now, elapsed, category.toString(), prepared, sql, url));
}
origin: p6spy/p6spy

public static synchronized void initialize() {
 final P6ModuleManager moduleManager = P6ModuleManager.getInstance();
 if (null == moduleManager) {
  // not initialized yet => can't proceed
  return;
 }
 
 final P6SpyOptions opts = moduleManager.getOptions(P6SpyOptions.class);
 logger = opts.getAppenderInstance();
 if (logger != null) {
  if (logger instanceof FileLogger) {
   final String logfile = opts.getLogfile();
   ((FileLogger) logger).setLogfile(logfile);
  }
  if (logger instanceof FormattedLogger) {
   final MessageFormattingStrategy strategy = opts.getLogMessageFormatInstance();
   if (strategy != null) {
    ((FormattedLogger) logger).setStrategy(strategy);
   }
  }
 }
}
origin: p6spy/p6spy

public static synchronized void initialize() {
 final P6ModuleManager moduleManager = P6ModuleManager.getInstance();
 if (null == moduleManager) {
  // not initialized yet => can't proceed
  return;
 }
 
 final P6SpyOptions opts = moduleManager.getOptions(P6SpyOptions.class);
 logger = opts.getAppenderInstance();
 if (logger != null) {
  if (logger instanceof FileLogger) {
   final String logfile = opts.getLogfile();
   ((FileLogger) logger).setLogfile(logfile);
  }
  if (logger instanceof FormattedLogger) {
   final MessageFormattingStrategy strategy = opts.getLogMessageFormatInstance();
   if (strategy != null) {
    ((FormattedLogger) logger).setStrategy(strategy);
   }
  }
 }
}
origin: p6spy/p6spy

@Override
public void logSQL(int connectionId, String now, long elapsed, Category category, String prepared, String sql, String url) {
 logText(strategy.formatMessage(connectionId, now, elapsed, category.toString(), prepared, sql, url));
}
com.p6spy.engine.spy.appenderFormattedLogger

Javadoc

P6Logger implementation providing support for pluggable MessageFormattingStrategy.

Most used methods

  • logText
  • setStrategy
    Sets the strategy implementation to use for formatting log message. If not set, this will default to

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • getSystemService (Context)
  • putExtra (Intent)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Reference (javax.naming)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for WebStorm
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