Codota Logo
ApplicationInsightsLogEvent.addLogEventProperty
Code IndexAdd Codota to your IDE (free)

How to use
addLogEventProperty
method
in
com.microsoft.applicationinsights.logback.internal.ApplicationInsightsLogEvent

Best Java code snippets using com.microsoft.applicationinsights.logback.internal.ApplicationInsightsLogEvent.addLogEventProperty (Showing top 2 results out of 315)

  • Common ways to obtain ApplicationInsightsLogEvent
private void myMethod () {
ApplicationInsightsLogEvent a =
  • Codota IconILoggingEvent loggingEvent;new ApplicationInsightsLogEvent(loggingEvent)
  • Smart code suggestions by Codota
}
origin: Microsoft/ApplicationInsights-Java

@Override
public Map<String, String> getCustomParameters() {
  Map<String, String> metaData = new HashMap<String, String>();
  metaData.put("SourceType", "LOGBack");
  addLogEventProperty("LoggerName", loggingEvent.getLoggerName(), metaData);
  addLogEventProperty("LoggingLevel", loggingEvent.getLevel() != null ? loggingEvent.getLevel().levelStr : null, metaData);
  addLogEventProperty("ThreadName", loggingEvent.getThreadName(), metaData);
  addLogEventProperty("TimeStamp", getFormattedDate(loggingEvent.getTimeStamp()), metaData);
  if (isException()) {
    addLogEventProperty("Logger Message", getMessage(), metaData);
  }
  for (Map.Entry<String, String> entry : loggingEvent.getMDCPropertyMap().entrySet()) {
    addLogEventProperty(entry.getKey(), entry.getValue(), metaData);
  }
  // TODO: No location info?
  // TODO: Username, domain and identity should be included as in .NET version.
  // TODO: Should check, seems that it is not included in Log4j2.
  return metaData;
}
origin: com.microsoft.azure/applicationinsights-logging-logback

@Override
public Map<String, String> getCustomParameters() {
  Map<String, String> metaData = new HashMap<String, String>();
  metaData.put("SourceType", "LOGBack");
  addLogEventProperty("LoggerName", loggingEvent.getLoggerName(), metaData);
  addLogEventProperty("LoggingLevel", loggingEvent.getLevel() != null ? loggingEvent.getLevel().levelStr : null, metaData);
  addLogEventProperty("ThreadName", loggingEvent.getThreadName(), metaData);
  addLogEventProperty("TimeStamp", getFormattedDate(loggingEvent.getTimeStamp()), metaData);
  if (isException()) {
    addLogEventProperty("Logger Message", getMessage(), metaData);
  }
  for (Map.Entry<String, String> entry : loggingEvent.getMDCPropertyMap().entrySet()) {
    addLogEventProperty(entry.getKey(), entry.getValue(), metaData);
  }
  // TODO: No location info?
  // TODO: Username, domain and identity should be included as in .NET version.
  // TODO: Should check, seems that it is not included in Log4j2.
  return metaData;
}
com.microsoft.applicationinsights.logback.internalApplicationInsightsLogEventaddLogEventProperty

Popular methods of ApplicationInsightsLogEvent

  • <init>
  • getFormattedDate
  • getMessage
  • isException
  • getNormalizedSeverityLevel

Popular in Java

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JList (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now