background preloader


Facebook Twitter

Tail taglib. Satyagraha/logviewer. Log4Play: Log4j Appender and UI with Play Framework, Knockout.js and WebSockets. We Recommend These Resources Log4Play is a Play!

Log4Play: Log4j Appender and UI with Play Framework, Knockout.js and WebSockets

Framework module that provides a log4j appender which publishes log entries to an EventStream. In theory, you can use it from any Java application that uses log4j, but I have only tested it with a Play! Framework application. Log4Play provides an user interface which uses a WebSocket to create a live stream of log messages. First we created a Log4J appender. 01.public class PlayWebSocketLogAppender extends WriterAppender implements Appender { 08. 09. public void append(LoggingEvent event) { 10.

Then we created a plugin to add the appender to log4j automatically, so you don't have to modify your log4j configuration. 01.public class Log4PlayPlugin extends PlayPlugin { 06. 07. public void onApplicationStart() { 10. 11. 14. 15. Then we created an event stream which will be receiving the log messages from the appender. 01.public abstract class LogStream { 11. public static EventStream<log4playevent> getStream() { Java web application that can stream the content of an arbitrary file to the browser (live tail)

Java - jsp to view log file (like "web tail -f") Davemc/websocket-logviewer. Dave Ferguson's Blog: Websockets demo: Log Watcher. So, I really wanted to create a demo for websockets that was not the norm.

Dave Ferguson's Blog: Websockets demo: Log Watcher

I wanted to try something that was more of a "what could I really do with with this" demo. After bouncing around a few ideas I finally settled on this, Log Watcher. How many times have you wished you could tail a log file on your remote ColdFusion server? How many times have you remoted into your server to tail a log? If you are anything like me (probably not but for arguments sake lets say you are) you have probably done it once this week. What is log tailing? Now, what if you didn't have to remote into the server to tail the log? So, how does it work?

To accomplish this there are a few things I had to overcome. ColdFISH is developed by Jason Delmore. Next was dealing with the display and that all logs are not created equal. The client portion of the app is very basic. ColdFISH is developed by Jason Delmore. This one little tag brings in all the necessary bits to do websockets. WebSocket. WebSocket is a protocol providing full-duplex communications channels over a single TCP connection.


The WebSocket protocol was standardized by the IETF as RFC 6455 in 2011, and the WebSocket API in Web IDL is being standardized by the W3C. Technical overview[edit] Browser implementation[edit] WebSocket protocol handshake[edit] To establish a WebSocket connection, the client sends a WebSocket handshake request, for which the server returns a WebSocket handshake response, as shown in the following example:[9]:section 1.2 Client request: GET /chat HTTP/1.1 Host: Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw== Sec-WebSocket-Protocol: chat, superchat Sec-WebSocket-Version: 13 Origin: Server response: HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: HSmrc0sMlYUkAGmm5OPpG2HaGWk= Sec-WebSocket-Protocol: chat Note that each line ends with an EOL (end of line) sequence, \r\n.

Proxy traversal[edit] `tail -f` in Node.js and WebSockets. Using WebSockets in WebLogic Server - 12c (12.1.2) In WebLogic Server, you can use the WebSocket Protocol implementation and accompanying programming API to develop and deploy applications that communicate bidirectionally with clients.

Using WebSockets in WebLogic Server - 12c (12.1.2)

Although you can use WebSockets for any type of client-server communication, the implementation is most commonly used to communicate with browsers running Web pages that use the WebSocket API. Understanding the WebLogic Server WebSockets Implementation The WebLogic Server WebSockets implementation includes the following components: WebSocket Protocol Implementation The WebSocket Protocol handles connection upgrades, establishes and manages connections, and handles exchanges with the client. WebLogic WebSocket Java API You can use the WebLogic WebSocket API weblogic.websocket package to develop WebSocket applications.