org.granite.logging.Logger类的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(267)

本文整理了Java中org.granite.logging.Logger类的一些代码示例,展示了Logger类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger类的具体详情如下:
包路径:org.granite.logging.Logger
类名称:Logger

Logger介绍

暂无

代码示例

代码示例来源:origin: org.graniteds/granite-client

  1. /**
  2. * Reads flushed stored object
  3. *
  4. * @return the stored object
  5. * @throws IOException
  6. */
  7. protected Object readFlushedSO() throws IOException {
  8. int index = dataInputStream.readUnsignedShort();
  9. log.debug("Object Index: %d", index);
  10. return storedObjects.get(index);
  11. }

代码示例来源:origin: org.graniteds/granite-client

  1. @Override
  2. public void onIssue(IssueEvent event) {
  3. log.error("Subscription failed %s: %s", consumer, event);
  4. }
  5. };

代码示例来源:origin: org.graniteds/granite-client

  1. @Override
  2. public void handleIO(boolean active) {
  3. log.info(active ? "Starting IO" : "IO completed");
  4. }

代码示例来源:origin: org.graniteds/granite-client

  1. public AMF3Deserializer(InputStream in) {
  2. super(in);
  3. debug = log.isDebugEnabled();
  4. debugMore = logMore.isDebugEnabled();
  5. if (debugMore) logMore.debug("new AMF3Deserializer(in=%s)", in);
  6. }

代码示例来源:origin: org.graniteds/granite-server

  1. protected void setMaxBinaryMessageBufferSize(int maxBinaryMessageBufferSize) {
  2. if (maxBinaryMessageBufferSize < 512)
  3. log.warn("Trying to set WebSocket maxBinaryMessageBufferSize too low: %d (ignored)", maxBinaryMessageBufferSize);
  4. else {
  5. log.debug("Setting MaxBinaryMessageBufferSize to: %d", maxBinaryMessageBufferSize);
  6. this.maxBinaryMessageBufferSize = maxBinaryMessageBufferSize;
  7. }
  8. }

代码示例来源:origin: org.graniteds/granite-server-ejb

  1. public void initGravity(Gravity gravity) {
  2. try {
  3. // Set reference in EJB proxy if found
  4. InitialContext ic = new InitialContext();
  5. org.granite.ejb.Gravity gravityEJB = (org.granite.ejb.Gravity)ic.lookup("java:global" + servletContext.getContextPath() + "/org.granite.ejb.Gravity");
  6. gravityEJB.setGravity(gravity);
  7. log.info("Registered Gravity EJB");
  8. }
  9. catch (Exception e) {
  10. log.debug(e, "Gravity EJB not found");
  11. }
  12. }

代码示例来源:origin: org.graniteds/granite-server

  1. public static void unregisterMBeans(ServletContext context) {
  2. String appName = ServletGraniteConfig.getConfig(context).getMBeanContextName();
  3. try {
  4. ObjectName name = new ObjectName("org.graniteds:type=GraniteDS,app=" + appName);
  5. log.info("Unregistering MBean: %s", name);
  6. MBeanServerLocator.getInstance().unregister(name);
  7. }
  8. catch (Exception e) {
  9. log.error(e, "Could not unregister GraniteDS MBean for context: %s", appName);
  10. }
  11. }
  12. }

代码示例来源:origin: org.graniteds/granite-client-java

  1. @Override
  2. public void onWebSocketText(String s) {
  3. log.warn("Websocket text message not supported");
  4. }
  5. }

代码示例来源:origin: org.ow2.kerneos.graniteds-osgi/granite-core

  1. @Validate
  2. public void start() {
  3. log.debug("Start OSGiDestinationAdapter: " + toString());
  4. if (service.findDestinationById(id) == null) {
  5. service.addDestination(this);
  6. started = true;
  7. } else {
  8. log.error("Destination \"" + id + "\" already registered");
  9. }
  10. }

代码示例来源:origin: org.graniteds/granite-client-java

  1. public static Logger getLogger(Class<?> clazz, LoggingFormatter formatter) {
  2. return getLogger(clazz.getName(), formatter);
  3. }

代码示例来源:origin: org.graniteds/granite-client-java

  1. private static boolean isVFSAvailable() {
  2. try {
  3. Class.forName("org.jboss.virtual.VFS");
  4. log.trace("VFS detected");
  5. return true;
  6. }
  7. catch (Throwable t) {
  8. return false;
  9. }
  10. }

代码示例来源:origin: org.graniteds/granite-client-java

  1. @Override
  2. protected org.apache.log4j.Logger getLoggerImpl() {
  3. return (org.apache.log4j.Logger)super.getLoggerImpl();
  4. }

代码示例来源:origin: org.graniteds/granite-server

  1. private String getStackTrace(Throwable t) {
  2. if (!log.isDebugEnabled())
  3. return "";
  4. StringWriter sw = new StringWriter();
  5. t.printStackTrace(new PrintWriter(sw));
  6. return sw.toString().replace("\r\n", "\n").replace('\r', '\n');
  7. }

代码示例来源:origin: org.graniteds/granite-server

  1. public static void registerMBeans(ServletContext context, ServletGraniteConfig gConfig, ServletServicesConfig sConfig) {
  2. String appName = ServletGraniteConfig.getConfig(context).getMBeanContextName();
  3. try {
  4. ObjectName name = new ObjectName("org.graniteds:type=GraniteDS,app=" + appName);
  5. log.info("Registering MBean: %s", name);
  6. OpenMBean mBean = OpenMBean.createMBean(gConfig);
  7. MBeanServerLocator.getInstance().register(mBean, name);
  8. }
  9. catch (Exception e) {
  10. log.error(e, "Could not register GraniteDS MBean for context: %s", appName);
  11. }
  12. }

代码示例来源:origin: org.graniteds/granite-client-javafx

  1. @Override
  2. public void onWebSocketText(String s) {
  3. log.warn("Websocket text message not supported");
  4. }
  5. }

代码示例来源:origin: org.graniteds/granite-server

  1. private Object mergeArray(ClassGetter classGetter, Object array, Object previous, Object owner, String propertyName) {
  2. if (log.isDebugEnabled())
  3. log.debug("Context mergeArray: " + array + (previous != null ? " previous " + previous.getClass().getName() : ""));
  4. Object key = CacheKey.key(array, owner, propertyName);
  5. int length = Array.getLength(array);
  6. Object prevArray = ArrayUtil.newArray(ArrayUtil.getComponentType(array.getClass()), length);
  7. DataMergeContext.getCache().put(key, prevArray);
  8. for (int i = 0; i < length; i++) {
  9. Object obj = Array.get(array, i);
  10. Array.set(prevArray, i, mergeExternal(classGetter, obj, null, null, null));
  11. }
  12. return prevArray;
  13. }

代码示例来源:origin: org.graniteds/granite-client-javafx

  1. public static Logger getLogger(Class<?> clazz, LoggingFormatter formatter) {
  2. return getLogger(clazz.getName(), formatter);
  3. }

代码示例来源:origin: org.graniteds/granite-client-javafx

  1. private static boolean isVFS3Available() {
  2. try {
  3. Class.forName("org.jboss.vfs.VFS");
  4. log.trace("VFS3 detected");
  5. return true;
  6. }
  7. catch (Throwable t) {
  8. return false;
  9. }
  10. }

代码示例来源:origin: org.graniteds/granite-client-javafx

  1. @Override
  2. protected java.util.logging.Logger getLoggerImpl() {
  3. return (java.util.logging.Logger)super.getLoggerImpl();
  4. }

代码示例来源:origin: org.graniteds/granite-client-javafx

  1. private String getStackTrace(Throwable t) {
  2. if (!log.isDebugEnabled())
  3. return "";
  4. StringWriter sw = new StringWriter();
  5. t.printStackTrace(new PrintWriter(sw));
  6. return sw.toString().replace("\r\n", "\n").replace('\r', '\n');
  7. }

相关文章