Log
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using flex.messaging.log.Log (Showing top 20 results out of 315)

origin: com.adobe.flex/com.springsource.flex.messaging

public SerializationFilter(String logCategory)
{
  isDebug = Log.isDebug();
  if (logCategory == null)
    logCategory = LogCategories.ENDPOINT_GENERAL;
  logger = Log.getLogger(logCategory);
}
origin: org.apache.flex.blazeds/flex-messaging-core

/**
 * Returns true if the passed in principal belongs to at least one of the
 * roles in the passed in list of roles.
 *
 * @param principal Principal to check against roles
 * @param roles list of roles
 * @return true if principal belongs to at least one of the roles in the list
 */
public boolean checkRoles(Principal principal, List roles)
{
  if (loginCommand == null) // This should not happen but just in case.
  {
    if (Log.isWarn())
      Log.getLogger(LOG_CATEGORY).warn
      ("Login command is null. Please ensure that the login-command"
          + " tag has the correct server attribute value"
          + ", or use 'all' to use the login command regardless of the server.");
    return false;
  }
  return loginCommand.doAuthorization(principal, roles);
}
origin: com.adobe.blazeds/blazeds-common

Log.removeTarget(this);
synchronized (lock)
  usingDefaultFilter = false;
Log.addTarget(this);
origin: org.apache.flex.blazeds/flex-messaging-core

/**
 * Starts the <code>JMSProducer</code>. Subclasses should call <code>super.start</code>.
 */
public void start() throws NamingException, JMSException
{
  super.start();
  if (Log.isInfo())
    Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS producer for JMS destination '"
        + destinationJndiName +"' is starting.");
}
origin: com.adobe.flex/com.springsource.flex.messaging

if (Log.isDebug())
  Log.getLogger(getMessageBroker().getLogCategory(pollCommand)).debug(
     "Before handling general client poll request. " + StringUtils.NEWLINE +
     "  incomingMessage: " + pollCommand + StringUtils.NEWLINE);
if (Log.isDebug())
  String debugPollResult = Log.getPrettyPrinter().prettify(pollResponse);
  Log.getLogger(getMessageBroker().getLogCategory(pollCommand)).debug(
     "After handling general client poll request. " + StringUtils.NEWLINE +
     "  reply: " + debugPollResult + StringUtils.NEWLINE);
origin: com.adobe.flex/com.springsource.flex.messaging

/**
 * @exclude
 * Removes a subscription from the subscription set for this MessageClient.
 * 
 * @param selector The selector expression for the subscription.
 * @param subtopic The subtopic for the subscription.
 * @return true if no subscriptions remain for this MessageClient; otherwise false.
 */
public boolean removeSubscription(String selector, String subtopic)
{
  synchronized (lock)
  {
    if (subscriptions.remove(new SubscriptionInfo(selector, subtopic)))
      return decrementReferences();
    else if (Log.isError())
      Log.getLogger(MessageService.LOG_CATEGORY).error("Error - unable to find subscription to remove for MessageClient: " + clientId + " selector: " + selector + " subtopic: " + subtopic);
    return numReferences == 0;            
  }
}
 
origin: com.adobe.flex/com.springsource.flex.messaging

/**
 * Stops the <code>JMSProducer</code> by closing its underlying
 * <code>MessageProducer</code>. It then calls <code>JMSProxy.close</code>
 * for session and connection closure.
 */
public void stop()
{
  if (Log.isInfo())
    Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS producer for JMS destination '" +
        destinationJndiName + "' is stopping.");
  try
  {
    if (producer != null)
      producer.close();
  }
  catch (JMSException e)
  {
    if (Log.isWarn())
      Log.getLogger(JMSAdapter.LOG_CATEGORY).warn("JMS producer for JMS destination '" +
          destinationJndiName + "' received an error while closing"
          + " its underlying MessageProducer: " + e.getMessage());
  }
  super.stop();
}
origin: com.adobe.flex/com.springsource.flex.messaging

/**
 * This is called remotely from other cluster members when a new remote subscription is identified.
 *
 * We add or remove a remote subscription...
 */
public void subscribeFromPeer(String destinationId, Boolean subscribe, String selector, String subtopic, Object remoteAddress)
{
  Destination destination = getDestination(destinationId);
  RemoteSubscriptionManager subMgr = ((MessageDestination) destination).getRemoteSubscriptionManager();
  if (destination instanceof MessageDestination)
  {
    if (Log.isDebug())
      Log.getLogger(MessageService.LOG_CATEGORY).debug("Received subscription from peer: " + remoteAddress + " subscribe? " + subscribe + " selector: " + selector + " subtopic: " + subtopic);
    if (subscribe.booleanValue())
      subMgr.addSubscriber(remoteAddress, selector, subtopic, null);
    else
      subMgr.removeSubscriber(remoteAddress, selector, subtopic, null);
  }
  else if (Log.isError())
    Log.getLogger(LOG_CATEGORY).error("subscribeFromPeer called with destination: " + destinationId + " that is not a MessageDestination");
}
origin: com.adobe.flex/com.springsource.flex.messaging

if (preferredLevel < Log.getTargetLevel())
  return;
    Log.getLogger(LogCategories.MESSAGE_GENERAL).fatal(output.toString());
    break;
    Log.getLogger(LogCategories.MESSAGE_GENERAL).error(output.toString());
    break;
    Log.getLogger(LogCategories.MESSAGE_GENERAL).warn(output.toString());
    break;
    Log.getLogger(LogCategories.MESSAGE_GENERAL).info(output.toString());
    break;
    Log.getLogger(LogCategories.MESSAGE_GENERAL).debug(output.toString());
    break;
    Log.getLogger(LogCategories.MESSAGE_GENERAL).fatal("Failed to log exception for handling message due to an invalid preferred log level: " + preferredLevel);
    break;
origin: com.adobe.blazeds/blazeds-common

/**
 * Constructs a <code>PropertyStringResourceLoader</code> that will use the
 * specified property bundles to use for string lookups.
 *
 * @param propertyBundles The list of the property bundles to use for lookups.
 */
public PropertyStringResourceLoader(String[] propertyBundles)
{
  this.propertyBundles = propertyBundles;
  logger = Log.getLogger(LOG_CATEGORY);
}
origin: com.adobe.flex/com.springsource.flex.messaging

  Log.setPrettyPrinterClass(ToStringPrettyPrinter.class.getName());
  return;
Log.createLog();
  Log.setPrettyPrinterClass(ToStringPrettyPrinter.class.getName());
Log.initialize(null, properties);
    target.setLevel(Log.readLevel(targetSettings.getLevel()));
    target.setFilters(targetSettings.getFilters());
    target.initialize(null, targetSettings.getProperties());
    Log.addTarget(target);
origin: org.apache.flex.blazeds/flex-messaging-core

@Override protected String toStringFields(int indentLevel)
{
  String sep = getFieldSeparator(indentLevel);
  String s = sep + "clientId = " + (Log.isExcludedProperty("clientId") ? Log.VALUE_SUPRESSED : clientId);
  s += sep + "correlationId = " + (Log.isExcludedProperty("correlationId") ? Log.VALUE_SUPRESSED : correlationId);
  s += sep + "destination = " + (Log.isExcludedProperty("destination") ? Log.VALUE_SUPRESSED : destination);
  s += sep + "messageId = " + (Log.isExcludedProperty("messageId") ? Log.VALUE_SUPRESSED : messageId);
  s += sep + "timestamp = " + (Log.isExcludedProperty("timestamp") ? Log.VALUE_SUPRESSED : String.valueOf(timestamp));
  s += sep + "timeToLive = " + (Log.isExcludedProperty("timeToLive") ? Log.VALUE_SUPRESSED : String.valueOf(timeToLive));
  s += sep + "body = " + (Log.isExcludedProperty("body") ? Log.VALUE_SUPRESSED : bodyToString(body, indentLevel));
  s += super.toStringFields(indentLevel);
  return s;
}
origin: com.adobe.blazeds/blazeds-common

if (targets.size() > 0 && (!verifyLevel || (level >= Log.getTargetLevel())))
    PrettyPrinter prettyPrinter = Log.getPrettyPrinter();
origin: com.adobe.flex/com.springsource.flex.messaging

/**
 * @param filter
 * @return whether the filter is valid  (with or without a trailing .*)
 */
public boolean checkFilter(String filter)
{
  for (int i = 0; i < categories.size(); i++)
  {
    if (Log.checkFilterToCategory((String)filter, (String)categories.get(i)))
    {
      return true;
    }
  }
  return false;
}
origin: org.apache.flex.blazeds/flex-messaging-core

private int internalParsePort(String url)
{
  int port = ChannelSettings.parsePort(url);
  // If there is no specified port, log an info message as urls without ports are supported
  if (port == 0 && Log.isInfo())
    log.info("No port specified in channel URL:  {0}", new Object[]{url});
  return port == -1? 0 : port; // Replace -1 with 0.
}
origin: org.apache.flex.blazeds/flex-messaging-core

if (Log.isDebug())
  Log.getLogger(getMessageBroker().getLogCategory(pollCommand)).debug(
     "Before handling general client poll request. " + StringUtils.NEWLINE +
     "  incomingMessage: " + pollCommand + StringUtils.NEWLINE);
if (Log.isDebug())
  String debugPollResult = Log.getPrettyPrinter().prettify(pollResponse);
  Log.getLogger(getMessageBroker().getLogCategory(pollCommand)).debug(
     "After handling general client poll request. " + StringUtils.NEWLINE +
     "  reply: " + debugPollResult + StringUtils.NEWLINE);
origin: com.adobe.blazeds/blazeds-opt

/**
 * Handles command execution problems by notifying the FailedExecutionHandler if one has been set
 * and otherwise logging the failure.
 * 
 * @param command The command that failed to execute successfully.
 * @param e The exception generated by the failed command.
 */
private void handleFailedExecution(Runnable command, Exception e)
{
  FailedExecutionHandler handler = getFailedExecutionHandler();
  if (handler != null)
  {
    handler.failedExecution(command, this, e);
  }   
  else if (Log.isError())
  {
    Log.getLogger(LogCategories.EXECUTOR).error("AsynchBeansWorkManager hit an Exception but no FailedExecutionHandler is registered to handle the error.", e);
  }
}
 
origin: com.adobe.flex/com.springsource.flex.messaging

/**
 * Starts the <code>JMSProducer</code>. Subclasses should call <code>super.start</code>.
 */
public void start() throws NamingException, JMSException
{
  super.start();
  if (Log.isInfo())
    Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS producer for JMS destination '"
        + destinationJndiName +"' is starting.");
}
origin: org.apache.flex.blazeds/flex-messaging-core

/**
 * Stops the <code>JMSProducer</code> by closing its underlying
 * <code>MessageProducer</code>. It then calls <code>JMSProxy.close</code>
 * for session and connection closure.
 */
public void stop()
{
  if (Log.isInfo())
    Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS producer for JMS destination '" +
        destinationJndiName + "' is stopping.");
  try
  {
    if (producer != null)
      producer.close();
  }
  catch (JMSException e)
  {
    if (Log.isWarn())
      Log.getLogger(JMSAdapter.LOG_CATEGORY).warn("JMS producer for JMS destination '" +
          destinationJndiName + "' received an error while closing"
          + " its underlying MessageProducer: " + e.getMessage());
  }
  super.stop();
}
origin: org.apache.flex.blazeds/flex-messaging-core

if (preferredLevel < Log.getTargetLevel())
  return;
    Log.getLogger(LogCategories.MESSAGE_GENERAL).fatal(output.toString());
    break;
    Log.getLogger(LogCategories.MESSAGE_GENERAL).error(output.toString());
    break;
    Log.getLogger(LogCategories.MESSAGE_GENERAL).warn(output.toString());
    break;
    Log.getLogger(LogCategories.MESSAGE_GENERAL).info(output.toString());
    break;
    Log.getLogger(LogCategories.MESSAGE_GENERAL).debug(output.toString());
    break;
    Log.getLogger(LogCategories.MESSAGE_GENERAL).fatal("Failed to log exception for handling message due to an invalid preferred log level: " + preferredLevel);
    break;
flex.messaging.logLog

Most used methods

  • getLogger
    Given a category, returns the logger associated with the category.
  • isDebug
    Indicates whether a debug level log event will be processed by a log target.
  • isWarn
    Indicates whether a warn level log event will be processed by a log target.
  • addTarget
    Adds a target to the log.
  • checkFilterToCategory
    Check whether the category match with the filter.
  • getPrettyPrinter
    Returns the PrettyPrinter used by the Log.
  • getTargetLevel
    Returns the current target level for the Log.
  • isError
    Indicates whether an error level log event will be processed by a log target.
  • isExcludedProperty
    Indicates whether a log property should be excluded.
  • isInfo
    Indicates whether an info level log event will be processed by a log target.
  • <init>
    Private constructor.
  • categoryMatchInFilterList
    This method checks that the specified category matches any of the filter expressions provided in the
  • <init>,
  • categoryMatchInFilterList,
  • checkCategory,
  • clear,
  • createLog,
  • flush,
  • getLoggers,
  • getTarget,
  • getTargetMap,
  • hasIllegalCharacters

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)